Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Lemmatization fails on CAPITALS

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from clips/MBSP

All issues in clips/MBSP

Similar issues

More Machine Learning issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.