Skip to content
Discussion options

You must be logged in to vote

Yes, you can do that in a straightforward way.

import spacy
nlp = spacy.load("en_core_web_sm")
doc = nlp.make_doc("I like cheese") # just tokenize
doc[0].tag_ = "VBP" # "I" is now a verb
doc2 = nlp(doc) # this predicts everything but doesn't overwrite existing settings

Note this depends on the overwrite flag in the Tagger and also possibly the AttributeRuler. See the docs.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@adrianeboyd
Comment options

@SilasTHU
Comment options

Answer selected by SilasTHU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / tagger Feature: Part-of-speech tagger
3 participants