klue-ner-fixed / README.md
dkqjrm's picture
Add fixed dataset README with normalization details
ef25b2e verified

KLUE NER Dataset - Fixed Converted Format

This dataset is converted from the original KLUE NER dataset with entity tags in the format <|B_LABEL|>entity<|E_LABEL|>.

Key improvements:

  • Only valid NER labels are used: DT, LC, OG, PS, QT, TI
  • Malformed labels are normalized (e.g., <23:39:TI><|B_TI|>23:39<|E_TI|>)
  • Entity content is preserved exactly as in the original text
  • Duplicate label prefixes are removed (e.g., <OG 부천지청:OG><|B_OG|>부천지청<|E_OG|>)

Dataset Structure

  • train: 21,008 examples
  • validation: 5,000 examples

Format Conversion

Original format: <entity:label> (with various malformed cases)
Converted format: <|B_LABEL|>entity<|E_LABEL|> (normalized)

Examples:

  • <영동고속도로:LC><|B_LC|>영동고속도로<|E_LC|>
  • <23:39:TI><|B_TI|>23:39<|E_TI|>
  • <OG 부천지청 형사 2부:OG><|B_OG|>부천지청 형사 2부<|E_OG|>

Entity Tags Used

The following 6 standard NER entity tags are used:

  • DT: Date (날짜) - Begin/End tags <|B_DT|> and <|E_DT|>
  • LC: Location (위치) - Begin/End tags <|B_LC|> and <|E_LC|>
  • OG: Organization (조직) - Begin/End tags <|B_OG|> and <|E_OG|>
  • PS: Person (인물) - Begin/End tags <|B_PS|> and <|E_PS|>
  • QT: Quantity (수량) - Begin/End tags <|B_QT|> and <|E_QT|>
  • TI: Time (시간) - Begin/End tags <|B_TI|> and <|E_TI|>

Total number of unique entity tokens: 12

Usage

from datasets import load_dataset

dataset = load_dataset("dkqjrm/klue-ner-fixed")
print("Source text:", dataset['train'][0]['source_text'])
print("Tagged text:", dataset['train'][0]['tagged_text'])

Fields

  • source_text: Original sentence with entities (no tags)
  • tagged_text: Converted sentence with <|B_LABEL|>entity<|E_LABEL|> format
  • tokens: Original character-level tokens from KLUE
  • ner_tags: Original NER tag indices from KLUE

Citation

@misc{klue-ner-fixed-converted,
  title={KLUE NER Dataset - Fixed Converted Format},
  author={Converted and normalized from original KLUE dataset},
  year={2024},
  howpublished={\url{https://huggingface.co/datasets/dkqjrm/klue-ner-fixed}}
}

Original KLUE dataset:

@article{park2021klue,
  title={KLUE: Korean Language Understanding Evaluation},
  author={Park, Sungjoon and Moon, Jihyung and Kim, Sungdong and Cho, Won Ik and Han, Jiyoon and Park, Jangwon and Song, Chisung and Kim, Junseong and Song, Yongsook and Taek Oh, Sang and others},
  journal={arXiv preprint arXiv:2105.09680},
  year={2021}
}