Commit 22518bb7 authored by Panagiotis Papadakos's avatar Panagiotis Papadakos
Browse files

[Stemmer & StopWords] Add example main

parent c51d3e05
......@@ -66,7 +66,7 @@ public class Stemmer {
EnglishStemmer.Singleton();
}
public static void main(String[] a) {
public static void anotherMain(String[] a) {
String w;
Stemmer.Initialize();
......@@ -77,5 +77,12 @@ public class Stemmer {
} while (!w.equals(""));
}
public static void main(String[] args) {
Stemmer.Initialize();
System.out.println(Stemmer.Stem("ending"));
System.out.println(Stemmer.Stem("publications"));
}
} // class Stemmer
......@@ -104,4 +104,11 @@ public class StopWords {
|| word.compareToIgnoreCase("or") == 0
|| word.compareToIgnoreCase("not") == 0;
}
public static void main(String[] args) {
StopWords.Initialize();
System.out.println(StopWords.isStopWord("ending")); // false
System.out.println(StopWords.isStopWord("other")); // true
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment