Counting the verbs, adjectives, nouns and other structures in Word

  • Thread starter c#, partofspeech, VSTO, word recog
  • Start date
C

c#, partofspeech, VSTO, word recog

I am trying to develop a class in C# that for each word in a msword document
it recognizes the partofspeech. The problem is that I'm not achieving to use
the thesaurus correctly.

For example:
The phrase: I am a developer.
The structure: <pronoun> + <verb> + <article> + <noun>

Using Microsoft Interop Word API I am only able to access the synonyms of
each word. Just after the synonyms I can get the PartOfSpeech. Is there
anyway to go directly to the word partofspeech? Using the synonyms to get the
partofspeech I can not get a reliable phrase structure. Is possible to do it
with c# and thesaurs or is there another dictionary or API?

Thank you for your attention.
 
J

Jean-Guy Marcil

c#, partofspeech, VSTO, word recog was telling us:
c#, partofspeech, VSTO, word recog nous racontait que :
I am trying to develop a class in C# that for each word in a msword
document it recognizes the partofspeech. The problem is that I'm not
achieving to use the thesaurus correctly.

For example:
The phrase: I am a developer.
The structure: <pronoun> + <verb> + <article> +
<noun>

Using Microsoft Interop Word API I am only able to access the
synonyms of each word. Just after the synonyms I can get the
PartOfSpeech. Is there anyway to go directly to the word
partofspeech? Using the synonyms to get the partofspeech I can not
get a reliable phrase structure. Is possible to do it with c# and
thesaurs or is there another dictionary or API?

Thank you for your attention.

This is fraught with many difficulties.

Fist off, consider this sentence:

"Rock rocks with rocks in his pants."

How is your code going to decide that the firs "Rock" is a proper noun, not
a noun, that the second "rocks" is a verb, not a noun, that the third
"rocks" is actually the noun and that "Pants" is actually a noun, no the
verb "to pant"?

And this is just the tip of the iceberg...

And how about, from a previous contributor:
"Dogs don't shower but showers can dog bridal showers."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top