1import spacy
2nlp = spacy.load('en_core_web_sm') # or some other model
3
4text_to_be_annotated = nlp('Put your long to-be-annotated text here')
5
6# pos: part-of-speech tagging
7# lemma: base form of the word
8# vector: embedding of the token (optional)
9annotated_text = {token : (token.pos_, token.lemma_, token.vector)
10 for token in text_to_be_annotated}