Skip to content
New issue

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

Verb characterized as noun in English text #13232

Closed
dglynos opened this issue Jan 12, 2024 · 2 comments
Closed

Verb characterized as noun in English text #13232

dglynos opened this issue Jan 12, 2024 · 2 comments
Labels
feat / tagger Feature: Part-of-speech tagger lang / en English language data and models perf / accuracy Performance: accuracy

Comments

@dglynos
Copy link

dglynos commented Jan 12, 2024

Hello, I've noticed that there are cases where spacy recognizes the root verb correctly in a sentence, but characterizes the verb's token as a noun. Here is an example where the root verb happens to also be a valid noun (of type NNS) in the English language. I've tested and this works in the same way on the _sm, _md and _lg models.

How to reproduce the behaviour

$ cat a.py 
import spacy
nlp = spacy.load('en_core_web_sm')
doc = nlp("The API call places in the response body today's date.")
verb = list(doc.sents)[0].root
print(verb, verb.tag_)
$ python a.py
places NNS

Environment

Python version used: 3.9.2
spacy version: 3.7.2
pip installed packages:
Package            Version
------------------ ----------
annotated-types    0.6.0
blis               0.7.11
catalogue          2.0.10
certifi            2023.11.17
charset-normalizer 3.3.2
click              8.1.7
cloudpathlib       0.16.0
confection         0.1.4
cymem              2.0.8
en-core-web-sm     3.7.1
idna               3.6
Jinja2             3.1.3
langcodes          3.3.0
MarkupSafe         2.1.3
murmurhash         1.0.10
numpy              1.26.3
packaging          23.2
pip                20.3.4
pkg-resources      0.0.0
preshed            3.0.9
pydantic           2.5.3
pydantic-core      2.14.6
requests           2.31.0
setuptools         44.1.1
smart-open         6.4.0
spacy              3.7.2
spacy-legacy       3.0.12
spacy-loggers      1.0.5
srsly              2.4.8
thinc              8.2.2
tqdm               4.66.1
typer              0.9.0
typing-extensions  4.9.0
urllib3            2.1.0
wasabi             1.1.2
weasel             0.3.4
@dglynos dglynos changed the title Verb characterized as noun in English text. Verb characterized as noun in English text Jan 12, 2024
@svlandeg svlandeg added the lang / en English language data and models label Jan 15, 2024
@svlandeg
Copy link
Member

Hi!

I'm not a native English speaker, but to me this example sentence sounds a bit odd, and I would personally rephrase it as "The API call places today's date in the response body.". In this case, the verb "places" is correctly classified as VBZ.

Either way - some mistakes are always possible. In the future, feel free to report these directly in the main thread: #3052

Closing this thread to merge it with #3052.

@svlandeg svlandeg added feat / tagger Feature: Part-of-speech tagger perf / accuracy Performance: accuracy labels Jan 15, 2024
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat / tagger Feature: Part-of-speech tagger lang / en English language data and models perf / accuracy Performance: accuracy
Projects
None yet
Development

No branches or pull requests

2 participants