Named entity recognition

Named Entity Recognition (NER)

Finding proper names in text and classifying them. A core sequence labeling task for information extraction, knowledge graph construction and search; in Arabic it faces the lack of capital letters and attached prefixes.

Sequence labeling
InputA sentence split into tokens
OutputA tag for each token in the BIO or BIOES scheme that marks entity boundaries and types (person, place, organization…)
Evaluation metricsEntity-level F1 (precision and recall for the whole entity)

In brief

  • The BIO scheme turns span extraction into a tag for each token.
  • CRF, then BiLSTM-CRF, then BERT models.
  • Nested entities need more complex schemes.

Arabic-specific difficulties

  1. No capital letters: in English, "Apple" with a capital letter is a strong signal of an entity; there is no equivalent in Arabic.
  2. Attached prefixes: “وبالقاهرة” ("and in Cairo") has a conjunction, a preposition and the definite article before the entity, so prefix segmentation improves performance.
  3. Ambiguity: “أمل” may be a person's name (Amal) or a common noun ("hope").

An F1 calculation example

The reference has two entities: [Mohamed Salah]PER and [Liverpool]ORG. The model predicted [Salah]PER and [Liverpool]ORG. The first entity has the wrong boundaries, so: precision = 1/2, recall = 1/2, F1 = 0.5, even though 2 of 3 tokens were tagged correctly.

References

  1. Lample, G. et al. (2016). Neural Architectures for Named Entity Recognition. NAACL 2016 arxiv.org/abs/1603.01360
  2. Benajiba, Y., Rosso, P., & Benedí Ruiz, J. M. (2007). ANERsys: An Arabic Named Entity Recognition System Based on Maximum Entropy. CICLing 2007 doi.org/10.1007/978-3-540-70939-8_13