enlp.understanding.linguistic.pos_tag¶
-
enlp.understanding.linguistic.
pos_tag
(model, text)[source]¶ Return parts-of-speech for words in a peice of text.
Part-of-speech tagging is the process of marking up a word in a text (corpus) as corresponding to a particular part of speech, based on both its definition and its context. A simplified form of this is commonly taught to children, in the identification of words as nouns, verbs, adjectives, adverbs, etc.
- Parameters
- model
spacy.lang
SpaCy language model
- text
str
text string on which to remove stopwords
- model
- Returns
- tags
list
List of part of speech tags, list is ordered as tokens appear in sentence.
- tags
Notes
To get direct linking with words corresponding to tags use tokenise function to get word list in same order as PoS tags.