Version 25 (modified by Ales Horak, 18 months ago) (diff)

edited by hales in

Named Entity Recognition

IA161 NLP in Practice Course, Course Guarantee: Aleš Horák

Prepared by: Zuzana Nevěřilová

State of the Art

NER aims to recognize and classify names of people, locations, organizations, products, artworks, sometimes dates, money, measurements (numbers with units), law or patent numbers etc. Known issues are ambiguity of words (e.g. May can be a month, a verb, or a name), ambiguity of classes (e.g. HMS Queen Elisabeth can be a ship), and the inherent incompleteness of lists of NEs.

Named entity recognition (NER) is used mainly in information extraction (IE) but it can significantly improve other NLP tasks such as syntactic parsing.

Example from IE

In 2003, Hannibal Lecter (as portrayed by Hopkins) was chosen by the American Film Institute as the number one movie villain.

Hannibal Lecter <-> Hopkins

Example concerning syntactic parsing

Wish You Were Here is the ninth studio album by the English progressive rock group Pink Floyd.


Wish_You_Were_Here is the ninth studio album by the English progressive rock group Pink Floyd.


  1. Charles Sutton and Andrew McCallum: An Introduction to Conditional Random Fields. Foundations and Trends in Machine Learning 4 (4). 2012.
  2. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding, 2019.
  3. Xinyu Wang, Yong Jiang, Nguyen Bach, Tao Wang, Zhongqiang Huang, Fei Huang, Kewei Tu: Automated Concatenation of Embeddings for Structured Prediction. Accepted to Proceedings of ACL-IJCNLP 2021. 17 pages.

Practical Session

Czech Named Entity Recognition

In this workshop, we train a new NER application for the Czech language. We work with free resources & software tools: the Czech NE Corpus (CNEC) and the FastText pre-trained word embeddings. We build a neural network to solve the problem.

  1. Create <YOUR_FILE>, a text file named ia161-UCO-04.txt where UCO is your university ID.
  2. Open Google Colab at
  3. Follow the instructions in the notebook. There are three obligatory tasks. Write down your answers to <YOUR_FILE>.

Attachments (2)

Download all attachments as: .zip