Python NLTK pos_tag gibt nicht den richtigen Wortart-Tag zurück
Haben dies:
text = word_tokenize("The quick brown fox jumps over the lazy dog")
Und läuft
nltk.pos_tag(text)
Ich bekomme
[('The', 'DT'), ('quick', 'NN'), ('brown', 'NN'), ('fox', 'NN'), ('jumps', 'NNS'), ('over', 'IN'), ('the', 'DT'), ('lazy', 'NN'), ('dog', 'NN')]
Das ist falsch. Die Tags fürquick brown lazy
im Satz sollte sein:
('quick', 'JJ'), ('brown', 'JJ') , ('lazy', 'JJ')
Testet dies durch ihreonline tool gibt das gleiche Ergebnis;quick
, brown
undfox
sollten Adjektive sein, keine Substantive.