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

Capitalization affects gerund tagging #1169

Open
jjshao-ms opened this issue Feb 10, 2025 · 2 comments
Open

Capitalization affects gerund tagging #1169

jjshao-ms opened this issue Feb 10, 2025 · 2 comments
Labels

Comments

@jjshao-ms
Copy link

nlp('Tutorial: creating a cake').debug()
nlp('Tutorial: Creating a cake').debug()

result:

  ┌─────────
  │ 'Tutorial'  - Expression
  │ 'creating'  - Verb, PresentTense, Gerund
  │ 'a'        - Determiner
  │ 'cake'     - Noun, Singular



  ┌─────────
  │ 'Tutorial'  - Expression
  │ 'Creating'  - ProperNoun, Noun
  │ 'a'        - Determiner
  │ 'cake'     - Noun, Singular

When capitalized, "creating" isn't being recognized as gerund, is this as expect?

@spencermountain
Copy link
Owner

hey Junjie - good point. The tagger looks at titlecase, and then checks if it is the first word of the sentence.
In your case, it is not, so it assumes it is a ProperNoun.
Will file it as a bug, thank you
cheers

@spencermountain
Copy link
Owner

for now, you can fix it with something like:

doc.match('^#Expression [#ProperNoun]', 0).match('/ing$/').tag('Gerund')

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants