101
правка
Изменения
→Частеречная разметка
text = "The quick brown fox jumps over the lazy dog"
ht.tag(text.split())
'''output:''' [('The', 'DT'), ('quick', 'JJ'), ('brown', 'JJ'), ('fox', 'NN'), ('jumps', 'NNS'), ('over', 'IN'), ('the', 'DT'), ('lazy', 'JJ'), ('dog', 'NN')]
* Stanford POS tagger
from os.path import expanduser
text = "The quick brown fox jumps over the lazy dog"
st.tag(text.split())
'''output:''' [(u'The', u'DT'), (u'quick', u'JJ'), (u'brown', u'JJ'), (u'fox', u'NN'), (u'jumps', u'VBZ'), (u'over', u'IN'), (u'the', u'DT'), (u'lazy', u'JJ'), (u'dog', u'NN')]
== Библиотеки для NLP ==