Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using wordnet (or some simple dictionary) to check if a noun is countable or uncountable from Java program

I found 2 libraries in Java – JWNL and JAWS. So far, it seems to me that these APIs are good for finding synsets and hyponyms and similar things. Do you know if there is some tool to use wordnet to check if a noun is a countable/uncountable noun? I mean, do people use wordnet for this task? Else, what is the tool?

like image 619
Bikash Gyawali Avatar asked Jun 20 '11 08:06

Bikash Gyawali


People also ask

How do you find out if a noun is countable or uncountable?

Countable nouns can be counted, e.g. an apple, two apples, three apples, etc. Uncountable nouns cannot be counted, e.g. air, rice, water, etc. When you learn a new noun, you should check if it is countable or uncountable and note how it is used in a sentence.

Is or are for uncountable noun?

Since uncountable nouns are singular, they also require singular verbs. If you're ever trying to decide whether to write the information is or the information are, remember that information is an uncountable noun and therefore needs is.


1 Answers

If you can't find an easy source, you can consider building your own classifier, ie. write your own user-defined-function.

Factors to consider:

  • There are some English dictionaries that will mark nouns as (U) vs (C) for uncountable vs countable, and you might be able to find out online somewhere.
  • You could look at bigrams in a huge corpus to see if the noun is used in the sense of countable or uncountable: one boy or this boy or that boy but some food or a little bit of food etc.
  • There are many corner cases that you have to account for: I'd like some coffee vs I'd like a coffee (short for a cup of coffee). It gets complicated.

This SO question is very relevant, though it doesn't address your Java request. All three answers to that question are very good.

Hope this helps.

like image 82
Ram Narasimhan Avatar answered Oct 25 '22 13:10

Ram Narasimhan