Lemmatization fails on CAPITALS
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start by reproducing the MBSP.lemmatize, MBSP.parse, and MBSP.tag examples with uppercase input. Trace the lemmatization and tagging entry points to determine why only the first uppercase word is processed. Done means uppercase words throughout a sentence are handled consistently, while the shown mixed-case behavior remains correct.
Written by the indexing model from the issue text.
Description
Fresh download of MBSP 1.4 from Github today:
>>> MBSP.lemmatize("The cats were sleeping.", tokenize=True)
u'the cat be sleep .'
For capital letters, only the first word works:
>>> MBSP.lemmatize("CATS WERE SLEEPING.", tokenize=True)
u'cat WERE SLEEPING .'
Other parts of MBSP have the same problem -- first word works, the rest fail:
>>> MBSP.parse('EATING PIZZA WITH A FORK.', lemmata=True)
u'EATING/VBG/I-VP/O/VP-1/A1/eat PIZZA/NN/I-NP/O/NP-OBJ-1/O/PIZZA WITH/IN/I-PP/B-PNP/O/P1/WITH A/DT/I-NP/I-PNP/O/P1/A FORK/NNP/I-NP/I-PNP/O/P1/FORK ././O/O/O/O/.'
>>> MBSP.tag(string, tokenize=True, lemmata=True)
u'CATS/NNS/cat ARE/VBP/ARE SLEEPING/NN/SLEEPING'
Sentences with initial capitals on non-initial words are handled correctly:
>>> MBSP.lemmatize("The Republicans were sleeping.", tokenize=True)
u'the Republican be sleep .'
Cheers,
David
- Dominant language
- Lex
- Stars
- 75
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from clips/MBSP
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
[BUG] mlflow.genai.evaluate fails for scorers that return NumPy scalars (np.bool_, np.int64, ...)Openarea/evaluation bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ml-explore/mlx-lm#1949 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
cleanlab/cleanvision#278 ·