Click here to Skip to main content
15,918,303 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to write a Lex and Yacc Program to check whether noun is countable or not??

Help me ...

Sergey Alexandrovich Kryukov 10-Mar-12 21:11pm    
What is not obvious here?
CPallini 12-Mar-12 4:48am    
As already explained, a dictionary would be more appropriate than Lex & Yacc.

1 solution

No matter what programs are you using, you can do it in only one way: by having a big dictionary which indicates some grammar and semantic categories in each article. The word itself carries no information on what is it. Moreover, before reading the information from the article, you need first classify each word as a noun or not, or with a dictionary, you need to decide which of the possible homonyms ([^]) should be considered. This is often impossible without analysis of the context (which is, in turn, a very difficult problem which is not solved with satisfactory quality on the present level of computer science and technology), and cannot be solves at all for certain texts. For example, the use of homonyms is typical for wordplay, so the final resolution of the meaning of the word by a human reader may be not even assumed.

You did not explain which languages do you mean, but for certain language the category of countability does not even exist or classification of nouns into countable and non-countable cannot be built or makes no sense.

Overall, the question does not make a whole lot of sense and not essentially related to Lex or Yacc.

Share this answer
CPallini 12-Mar-12 4:47am    
My 5.
Sergey Alexandrovich Kryukov 12-Mar-12 4:55am    
Thank you very much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900