WordNet Based Graph Search
Task Description: see the details in “[login to view URL]”
Checklist: see the details in “[login to view URL]”
In detail, you can find what you have to do in the project file: “[login to view URL]”.
Mainly, you are required to implement the following class:
WordNet data type. Implement an immutable data type WordNet with the following API:
public class WordNet {
// constructor takes the name of the two input files
public WordNet(String synsets, String hypernyms)
// returns all WordNet nouns
public Iterable<String> nouns()
// is the word a WordNet noun?
public boolean isNoun(String word)
// distance between nounA and nounB (defined below)
public int distance(String nounA, String nounB)
// a synset (second field of [login to view URL]) that is the common
ancestor of nounA and nounB
// in a shortest ancestral path (defined below)
public String sap(String nounA, String nounB)
// do unit testing of this class
public static void main(String[] args)
}
You can continue to read the text afterwards to find details for each of them.
2. What will be the sample input?
You can find sample input in the Checklist.htm.
Download wordnet-testing.zip.
[login to view URL]
3. What will be the target output?
Target out will be correct values/results for your queries, according the semantic tree build in
WordNet.