diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-21 18:18:06 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-21 18:18:06 +0100 |
commit | 4020858e2a7ca3557d6ddfa40ceec0a191ef2605 (patch) | |
tree | 7aa6747d6470b24ac384987610f8416a212e1b50 /Algorithms/Part-II/1-WordNet/Outcast.java | |
parent | b748bc695362b353af08a9d9019876761500012f (diff) | |
download | coursera-4020858e2a7ca3557d6ddfa40ceec0a191ef2605.zip coursera-4020858e2a7ca3557d6ddfa40ceec0a191ef2605.tar.gz |
Algorithms-II : 1-WordNet: add prototypes and data
Diffstat (limited to 'Algorithms/Part-II/1-WordNet/Outcast.java')
-rw-r--r-- | Algorithms/Part-II/1-WordNet/Outcast.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Algorithms/Part-II/1-WordNet/Outcast.java b/Algorithms/Part-II/1-WordNet/Outcast.java new file mode 100644 index 0000000..296fd79 --- /dev/null +++ b/Algorithms/Part-II/1-WordNet/Outcast.java @@ -0,0 +1,27 @@ +/* vim: set expandtab tabstop=4 shiftwidth=4 : */ + +public class Outcast +{ + // constructor takes a WordNet object + public Outcast(WordNet wordnet) + { + } + + // given an array of WordNet nouns, return an outcast + public String outcast(String[] nouns) + { + return ""; + } + + // for unit testing of this class (such as the one below) + public static void main(String[] args) + { + WordNet wordnet = new WordNet(args[0], args[1]); + Outcast outcast = new Outcast(wordnet); + for (int t = 2; t < args.length; t++) { + String[] nouns = In.readStrings(args[t]); + StdOut.println(args[t] + ": " + outcast.outcast(nouns)); + } + } +} + |