1

I'm not sure this is a coding issue/question. I'm using Google's NLP to analyze the syntax of some sentences and I'm seeing some inconsistencies with Plural vs Singular designation. Perhaps I'm doing something wrong or misunderstanding what I see as an inconsistency.

For example.

The dolphins jump over the wall

The word dolphins is labeled as "SINGULAR" and I was expecting "PLURAL". I thought, maybe cause it's referring to the group, as ONE "school of fish"(although they are mammals)

So I tried Crows

The crows jump over the wall

The crows are jumping over the wall

Both of these return crows as "SINGULAR", which I thought would be consistent since a group of crows is ONE "Murder of Crows"

Ok, fine then I tried Cows - a group of cows is ONE Herd

The cows jump over the wall

But in this sentence, the word cows is labeled "PLURAL".

I'm no linguistics expert that maybe be a cause of my confusion. Or is this "inconsistency" due to analyzing the sentence ONLY using the analyzeSyntax API without analyzing its sentiment or the entities?

This is the log for The cows jump over the wall.

{ theSentence: 'The cows jump over the wall.',
  theTags: [ 'DET', 'NOUN', 'VERB', 'ADP', 'DET', 'NOUN', 'PUNCT' ],
  theLabels: [ 'DET', 'NSUBJ', 'ROOT', 'PREP', 'DET', 'POBJ', 'P' ],
  theNumbers: 
   [ 'NUMBER_UNKNOWN',
     'PLURAL',
     'SINGULAR',
     'NUMBER_UNKNOWN',
     'NUMBER_UNKNOWN',
     'SINGULAR',
     'NUMBER_UNKNOWN' ]

This is the log for The crows jump over the wall.

{ theSentence: 'The crows jump over the wall.',
  theTags: [ 'DET', 'NOUN', 'VERB', 'ADP', 'DET', 'NOUN', 'PUNCT' ],
  theLabels: [ 'DET', 'NSUBJ', 'ROOT', 'PREP', 'DET', 'POBJ', 'P' ],
  theNumbers: 
   [ 'NUMBER_UNKNOWN',
     'SINGULAR',
     'SINGULAR',
     'NUMBER_UNKNOWN',
     'NUMBER_UNKNOWN',
     'SINGULAR',
     'NUMBER_UNKNOWN' ]

Update : I tried using https://language.googleapis.com/v1beta2/documents:analyzeSyntax and I get the same results

Mcorv
  • 161
  • 3
  • 12
  • 1
    A public issue tracker is created for the issue encountered on denoting a word's grammatical number. Feel free to add on more use cases where this issue is encountered. See issue tracker https://issuetracker.google.com/199097296. – Ricco D Sep 07 '21 at 01:30

0 Answers0