Skip to content
Discussion options

You must be logged in to vote

Please don't post screenshots of text, post text as text, for example using a markdown code block.

I am not sure what you mean by "lexicon", but you can produce output similar to your example like this:

import spacy
nlp = spacy.load("en_core_web_sm")

for tok in nlp("This is input"):
    print(tok.i, tok, tok.lemma_, tok.pos_, sep="\t")

You can redirect that to a file in the shell, or you can save it to a string and write a file as usual.

Does that answer your question?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jacklanda
Comment options

Answer selected by polm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage General spaCy usage
2 participants
Converted from issue

This discussion was converted from issue #11804 on November 15, 2022 03:58.