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
Doc.noun_chunks()is sometimes handing me back shorter noun chunks than I would have expected.
For example, in the code below, kobe bryant is sometimes split across noun chunks:
Example
importen_core_web_lgnlp=en_core_web_lg.load()
sent=u'''Add kobe bryant shoes to my cart'''.strip()
tokens=nlp(sent)
print(sent)
forchunkintokens.noun_chunks:
print("\t{}".format(chunk.orth_))
sent=u'''Add kobe beef and kobe bryant shoes to my cart'''.strip()
tokens=nlp(sent)
print(sent)
forchunkintokens.noun_chunks:
print("\t{}".format(chunk.orth_))
Output
Add kobe bryant shoes to my cart
kobe bryant shoes
my cart
Add kobe beef and kobe bryant shoes to my cart
kobe beef
kobe
bryant shoes
my cart
In the second example, I would not have expected kobe and bryant shoes to be split across noun chunks, given that they were not split in the first example.
Environment
spaCy version: 2.0.5
Python version: 3.5.1
Models: en_core_web_lg
Platform: Darwin-17.4.0-x86_64-i386-64bit
The text was updated successfully, but these errors were encountered:
The noun chunks depend on the part-of-speech tags and dependency parse, so this issue likely comes down to incorrect predictions made by the tagger or parser.
I'm merging this with #3052. We've now added a master thread for incorrect predictions and related reports – see the issue for more details.
Doc.noun_chunks()
is sometimes handing me back shorter noun chunks than I would have expected.For example, in the code below,
kobe bryant
is sometimes split across noun chunks:Example
Output
In the second example, I would not have expected
kobe
andbryant shoes
to be split across noun chunks, given that they were not split in the first example.Environment
The text was updated successfully, but these errors were encountered: