Add Custom Labels to NLTK Information Extractor I am working on an information extractor specifically purposed with parsing relationships between entities such as movies, directors, and actors. NLTK appears to provide the necessary tools to construct such a system. However, it is not clear how one would go about adding custom labels (e.g. actor, director, movie title).

Similarly, Chapter 7 of the NLTK Book discusses information extraction using a named entity recognizer, but it glosses over labeling details.

So, I have two questions:

How would I add custom labels?
If I have bare lists of relevant named entities (e.g. movies, actors, etc.), how can I include them as features? It appears that I would need to use IOB format, but I am unsure about how to do this when I only have lists of named entities.
Once you have your own lists of named entities, and you're only interested in extracting the relations, I believe there are simpler solutions (although I never tried relation extraction in NLTK, so I might be wrong):


ReVerb - a tool written in Java. Once it produces the results, you can simply keep the rows, where your labels are present as objects of the relation.
OpenIE - the successor of ReVerb (also written in Java). The authors claim better perfomance, and the output might be more informative.
IEPY - a relation extraction tool in Python. You should be able to provide your own labels/named entities using gazetees.
MITIE - this library has bindings in Python, and it offers relation extraction functionality.