Description
learnRelation is a web service for supervised learning of relations in text. It requires annotated text as input (in the format specified below), and produces a ‘model’ as output. This model can subsequently be used for RelationExtraction.
Output
modelFile (log file modelFile.log is stored in the same directory as modelFile)
Input
inputData has to be annotated as follows:all tokens/words are separated by newlinesentences are separated by the newline. The first line right after the last word in a sentence contains *all* available/detected named entities, the second line lists all relation mentions. Annotations are done assuming the position of the first word in a sentence to be 1.
Example input:
This is PROTEIN1 interacting with PROTEIN2 but not interacting with PROTEIN3 . protein(3) protein(6) protein(11) relation_mention(3,6)
This is a test .
From javadocs
learnRelation
public String learnRelation(String inputData, String modelFile)
- Creates a model
modelFilebased on theinputDataand returns the results of the 10-fold cross-validation. -
- Parameters:
inputData- annotated training set- Returns:
modelFile(log filemodelFile.logis stored in the same directory asmodelFile) Note that this is a supervised learner which means that theinputDatahas to be annotated as follows:all tokens/words are separated by newlinesentences are separated by the newlineThe first line right after the last word in a sentence contains *all* available/detected named entities, the second line lists all relation mentions. Annotations are done assuming the position of the first word in a sentence to be 1. Examples:ThisisPROTEIN1interacting
with
PROTEIN2
but
not
interacting
with PROTEIN3
.
protein(3) protein(6) protein(11)
relation_mention(3,6)
This
is
a
test
.
0 responses so far ↓
You must log in to post a comment.