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
I'm on Python 3.11 with spacy 3.7.4 and noted an inconsistent behavior when I lemmatize my German text.
import spacy nlp = spacy.load("de_core_news_sm") doc = nlp("(Das ist ein Test!)") for token in doc: print(f"Text: '{token.text}', Lemma: '{token.lemma_}'")
Output:
Text: '(', Lemma: '--' Text: 'Das', Lemma: 'der' Text: 'ist', Lemma: 'sein' Text: 'ein', Lemma: 'ein' Text: 'Test', Lemma: 'Test' Text: '!', Lemma: '--' Text: ')', Lemma: '--'
However, note the English standard model:
import spacy nlp = spacy.load("en_core_web_sm") doc = nlp("(This is a test!)") for token in doc: print(f"Text: '{token.text}', Lemma: '{token.lemma_}'")
Text: '(', Lemma: '(' Text: 'This', Lemma: 'this' Text: 'is', Lemma: 'be' Text: 'a', Lemma: 'a' Text: 'test', Lemma: 'test' Text: '!', Lemma: '!' Text: ')', Lemma: ')'
On StackOverlow, the answer-giver reported the Dutch model treats punctuation as in English.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm on Python 3.11 with spacy 3.7.4 and noted an inconsistent behavior when I lemmatize my German text.
How to reproduce the behaviour
Output:
However, note the English standard model:
Output:
On StackOverlow, the answer-giver reported the Dutch model treats punctuation as in English.
Your Environment
The text was updated successfully, but these errors were encountered: