I am new at nltk library and I try to teach my classifier some labels with my own corpus.
For this I have a file with IOB tags like this :
How O
do B-MYTag
you I-MYTag
know O
, O
where B-MYTag
to O
park O
? O
I do this by:
self.classifier = nltk.MaxentClassifier.train(train_set, algorithm='megam', trace=0)
and it works.
How to train my classifier
with negative cases?
I would have similar file with IOB tags, and I would specified that this file is set wrong. (Negative weights)
How can I do this?
Example for negative case would be:
How B-MYTag
do O
you O
know O
, O
where B-MYTag
to O
park O
? O
After that, I expect to remember that How is probably not a MYTag... The reason for this is, classifier to learn faster.
If I could just type the statements, program would process it and at the end ask me if I am satisfied with the result. If I am, this text would be added to the train_set
, if not it would be added to the negative_train_set
.
This way, it would be easier and faster to teach classifier the right stuff.