diff options
Diffstat (limited to 'Algorithms/Part-II/1-WordNet/Outcast.java')
-rw-r--r-- | Algorithms/Part-II/1-WordNet/Outcast.java | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/Algorithms/Part-II/1-WordNet/Outcast.java b/Algorithms/Part-II/1-WordNet/Outcast.java index af2b6f3..e9d7911 100644 --- a/Algorithms/Part-II/1-WordNet/Outcast.java +++ b/Algorithms/Part-II/1-WordNet/Outcast.java @@ -38,14 +38,28 @@ public class Outcast Outcast outcast = new Outcast(wordnet); String[] nouns; + Stopwatch st = new Stopwatch(); + double t0, t1 = 0; + nouns = new In("./data/outcast5.txt").readAllStrings(); - StdOut.println(outcast.outcast(nouns)); + t0 = st.elapsedTime(); + StdOut.println(outcast.outcast(nouns)+" " + (t0 - t1)); + t1 = t0; nouns = new In("./data/outcast8.txt").readAllStrings(); - StdOut.println(outcast.outcast(nouns)); + t0 = st.elapsedTime(); + StdOut.println(outcast.outcast(nouns)+" " + (t0 - t1)); + t1 = t0; nouns = new In("./data/outcast11.txt").readAllStrings(); - StdOut.println(outcast.outcast(nouns)); + t0 = st.elapsedTime(); + StdOut.println(outcast.outcast(nouns)+" " + (t0 - t1)); + t1 = t0; + + nouns = new In("./data/outcast29.txt").readAllStrings(); + t0 = st.elapsedTime(); + StdOut.println(outcast.outcast(nouns)+" " + (t0 - t1)); + t1 = t0; } } |