clips / clips/MBSP

Lemmatization fails on CAPITALS

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

Nobody has claimed this yet.

Dominant language
Lex
Stars
75
Forks
20
PR merge metrics
No merged PRs in 30d

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

Contributor guide

No contributing guide indexed for this repository

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.

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.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.