This is an example of using pycrfsuite to train a CRF classifier for named entity recognition. For more detailed explanation, refer to the blog post at: http://www.albertauyeung.com/post/python-sequence-labelling-with-crf/.
Before running the script, download the data file reuters.xml
from https://github.com/AKSW/n3-collection/blob/master/reuters.xml, and install the dependencies:
$ sudo pip install -r requirements.txt