Tools for training a Stanford NER model, based on the example in the Stanford NER FAQ.
- Install Java.
- Download Stanford NER from https://nlp.stanford.edu/software/CRF-NER.shtml#Download
- Extract it to a directory named
stanford-ner
in this directory.
- Provide two sets of examples in
train.txt
andtest.txt
with one example on each line. - Run
make sources
to producetrain.tsv
andtest.tsv
. - Edit
train.tsv
andtest.tsv
, replacingO
with entity names where appropriate. This may take some time. - Run
make model
to produce the model, inner-model.ser.gz
. - Run
make check
to test the model against the examples fromtest.txt
.