taku910 / crfpp

CRF++: Yet Another CRF toolkit
Other
505 stars 192 forks source link

USAGE - adding category of sentence as a feature #38

Closed arjunmenon closed 7 years ago

arjunmenon commented 7 years ago

How can I represent category of sentence predicted from a text classifier as a feature in CRF++?

For instance, if the sentence, Tumblr merges with Yahoo., is classified as Business, then while composing the training file for crf, where can I indicate the label Business as a feature? And how should then the template be modeled?

Should the train file be like this

Tumblr    business    ORG
merges    business    O
with     business    O
Yahoo    business    ORG

Or only include the category with the ORG label? How so? And the template file? If you could help out.