Models
Included with Stanford relation extractor is a classifier to predict relations Live_In, Located_In, OrgBased_In, Work_For, and None.
Usage
Use annotator "relation" in the Stanford CoreNLP pipeline and the results are saved in annotationsMachineReadingAnnotations.RelationMentionsAnnotation.class
, which returns a list of RelationMention
.Training and specifying your own model
If you want to train your own model, see this properties file for an example. The description of the flags is in the file. You can run the code asjava -cp classpath edu.stanford.nlp.ie.machinereading.MachineReading --arguments roth.properties
Once you train your model, you can specify your trained model in the Stanford CoreNLP pipeline with property sup.relation.model=[value in the flag serializedRelationExtractorPath]
Read full article from The Stanford NLP (Natural Language Processing) Group
No comments:
Post a Comment