Tagger identifies the name Fred as a VBN
smalltalk-josh opened this issue · 1 comments
smalltalk-josh commented
It turn the NNP "Fred" into a VBN. I think it is because it ends in "ed"
var pos = require('pos');
var words = new pos.Lexer().lex('My name is Fred Jenkins');
var tagger = new pos.Tagger();
var taggedWords = tagger.tag(words);
expected:
[
['My', 'PRP$'],
['name', 'NN'],
['is', 'VBZ'],
['Fred', 'VBN'],
['Jenkins', 'NNP']
]
actual:
[
['My', 'PRP$'],
['name', 'NN'],
['is', 'VBZ'],
['Fred', 'NNP'],
['Jenkins', 'NNP']
]
Hugo-ter-Doest commented
I think you're right: rule number 3 says that if a noun ends in 'ed' it is probably (in most cases) a verb (past participle). You could narrow down the rule to only apply to nouns and not to proper nouns. Right now it tests on the first character of the category. You could test for "NN" specifically. However, you may loose precision in other cases. The set of transformation rules is statistically derived from a corpus. So there was evidence in the corpus that this is a "good" transformation rule.
Hugo