Bikash Gyawali
Bikash Gyawali

Reputation: 1058

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?

Upvotes: 8

Views: 1590

Answers (2)

Ram Narasimhan
Ram Narasimhan

Reputation: 22506

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.

Upvotes: 1

Brad Christie
Brad Christie

Reputation: 101614

I'm not 100% positive what you're going for, but WolframAlpha has a developer interface you may be able to use.

They also seem to have a java library already, though the free version appears to be limited to 2k queries (Don't know if thats a feasible limitation).

Upvotes: 0

Related Questions