You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using spaCy's part of speech tagger but sometimes there's no output when using .pos_. The following script can reproduce the bug and shows a comparison between the section of missing information in .pos_ with what's found in .tag_:
nlp = spacy.load('fr_core_news_sm')
doc = nlp("Pour poser des congés, qu'est-ce que je fais ?")
tagged_pos = [[token.text, token.pos_] for token in doc]
tagged_tag = [[token.text, token.tag_] for token in doc]
pprint(tagged_pos)
pprint(tagged_tag)
Relevant output with missing part of speech information when using .pos_:
["qu'", ''],
['est', ''],
But when using .tag_, part of speech is found:
["qu'", 'ADV'],
['est', 'VERB'],
Is this just a situation where the relevant keys are missing from the tag_map (a very quick fix), or is there potentially something else going on here?
(Also, I'm not sure qu' is an adverb but maybe that's a separate issue...)
Your Environment
Operating System: MacOS 10.13.2
Python Version Used: 3.6.3
spaCy Version Used: 2.0.7
spaCy Model Used: fr_core_news_sm
Environment Information:
The text was updated successfully, but these errors were encountered:
Hello,
I'm using spaCy's part of speech tagger but sometimes there's no output when using
.pos_
. The following script can reproduce the bug and shows a comparison between the section of missing information in.pos_
with what's found in.tag_
:Relevant output with missing part of speech information when using
.pos_
:But when using
.tag_
, part of speech is found:Is this just a situation where the relevant keys are missing from the tag_map (a very quick fix), or is there potentially something else going on here?
(Also, I'm not sure qu' is an adverb but maybe that's a separate issue...)
Your Environment
The text was updated successfully, but these errors were encountered: