We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
words = ["This", "is", "a", "sentence"] pos_s = ["DET", "VERB", "DET", "NOUN"] spaces = [" ", " ", " ", ""] deps_s = ["dep", "adj", "nn", "atm"] tags_s = ["DT", "VBZ", "DT", "NN"] nlp = English() strings = nlp.vocab.strings for w in words: strings.add(w) deps = [strings.add(d) for d in deps_s] pos = [strings.add(p) for p in pos_s] tags = [strings.add(t) for t in tags_s] attrs = [POS, DEP, TAG] array = numpy.array(list(zip(pos, deps, tags)), dtype="uint64") doc = Doc(nlp.vocab, words=words, spaces=spaces) doc.from_array(attrs, array) print("1", [(token.text, token.pos_, token.tag_) for token in doc]) doc2 = get_doc(nlp.vocab, words=words, pos=pos_s, deps=deps_s, tags=tags_s) print("2", [(token.text, token.pos_, token.tag_) for token in doc2])
output:
1 [('This', 'DET', 'DT'), ('is', 'VERB', 'VBZ'), ('a', 'DET', 'DT'), ('sentence', 'NOUN', 'NN')] 2 [('This', 'DET', 'DT'), ('is', 'AUX', 'VBZ'), ('a', 'DET', 'DT'), ('sentence', 'NOUN', 'NN')]
For the second token, the POS should be VERB, not AUX.
POS
VERB
AUX
Will be submitting a PR soon to fix this!
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
How to reproduce the behaviour
output:
For the second token, the
POS
should beVERB
, notAUX
.Will be submitting a PR soon to fix this!
The text was updated successfully, but these errors were encountered: