question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some nouns are mistaken for adjectives

See original GitHub issue

In the sentence “The current directory.”, the noun directory is mistaken for an adjective, and is “grouped” with current:

> nlp.sentence('The current directory.')
Sentence {
  str: 'The current directory.',
  terms: 
   [ Term {
       whitespace: [Object],
       text: 'The',
       normal: 'the',
       expansion: null,
       reason: 'lexicon_pass',
       pos: [Object],
       tag: 'Determiner' },
     Adjective {
       whitespace: [Object],
       text: 'current directory.',
       normal: 'current directory',
       expansion: null,
       reason: 'rules_pass_18',
       pos: [Object],
       tag: 'Adjective' } ],
  contractions: { expand: [Function: expand], contract: [Function: contract] } }

But if I replace directory by a more common noun like car or monkey, everything works as expected.

There is the same issue with repository used as a noun too.

Thanks for this great library 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ilyankoucommented, Jun 16, 2016

Fixed, to be merged soon.

1reaction
motet-acommented, Jun 15, 2016

I just realized I can solve this issue by adding the word directory to the lexicon as a noun. But wouldn’t it cause other issues if I use directory as an adjective in a sentence such as “The directory assistance.” ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commonly Confused Adjectives & Correct Uses - Ifioque.com
Little, A little, and The little;” “Less vs Fewer;” “Some vs Any;” “High vs Tall,” etc. These words including a number of others...
Read more >
Commonly Confused Adjectives with Explanations
Adjectives pose several problems because they often sound similar and mean similar things but are used with different nouns.
Read more >
Commonly Confused Adjectives with ... - Begin English
Some English adjectives may be confusing due to their spelling, meaning and pronunciation. ... Use “much” with collective nouns and singular nouns.
Read more >
Examples of Difficult & Confusing Adjectives - Study.com
Some of the most common mistakes involve adjectives, or words that describe and modify nouns. These often involve pairs of words that are ......
Read more >
Adjectives that Look Like Nouns - Merriam-Webster
Sometimes adjectives are used as nouns in ways that don't change their essential meaning, just their grammatical role in a sentence.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found