Commits

muzny committed 629fb71

Detector methods commenting

Comments (0)

Files changed (8)

WiktionaryIdioms/src/classifier/utilities/WordNetUtils.java

 import edu.smu.tspell.wordnet.WordSense;
 
 public class WordNetUtils {
-	public static final String DATABASE_DIR = "/Users/golux/Research/WordNet-3.0/dict/";
+	public static final String DATABASE_DIR = "[FILL ME IN]/WordNet-3.0/dict/";
 	
 	private static String isSet;
 	private static WordNetUtils instance;  // flyweight

WiktionaryIdioms/src/detector/methods/Baseline.java

+/**
+ * The baseline disambiguation method predicts a sense only
+ * if there is only 1 sense corresponding to the phrase in question.
+ * In all other cases, makes no prediction.
+ */
+
 package detector.methods;
 
 import java.util.List;

WiktionaryIdioms/src/detector/methods/BaselineFirst.java

+/**
+ * The BaselineFirst disambiguation method always chooses the
+ * first sense that corresponds to the given phrase, as determined by
+ * lowest sense key. Depends on the structure of the database and the
+ * corresponding sense output file to list this sense first.
+ */
+
 package detector.methods;
 
 import java.util.List;
 		if (senses.size() == 1) {
 			return senses.get(0).getKey();
 		}
-
+				
 		return senses.get(0).getKey();
 	}
 

WiktionaryIdioms/src/detector/methods/BaselineRandom.java

+/**
+ * Chooses a sense that corresponds to the phrase in question
+ * randomly.
+ */
+
 package detector.methods;
 
 import java.util.Collections;

WiktionaryIdioms/src/detector/methods/BasicLesk.java

+/**
+ * Disambiguates based on the basic lesk algorithm, and which
+ * sense has the highest computed overlap.
+ */
+
 package detector.methods;
 
 import java.util.List;

WiktionaryIdioms/src/detector/methods/DetectorMethod.java

+/**
+ * This class provides a common interface for all the disambiguation
+ * methods that the detector uses. Requires detector config file to be
+ * present, and requires stop words file.
+ */
+
 package detector.methods;
 
 import java.util.List;

WiktionaryIdioms/src/detector/methods/ExtendedLesk.java

+/**
+ * Disambiguates based off of the elesk algorithm.
+ * Does this based off of the WordNet graph. This means that the
+ * class constant DATABASE_DIR needs to be set properly in WordNetUtils for this
+ * to work.
+ */
+
 package detector.methods;
 
 import java.util.ArrayList;

WiktionaryIdioms/src/detector/methods/LatentSemantics.java

-package detector.methods;
-
-import classifier.model.ClassifierData;
-
-public class LatentSemantics extends DetectorMethod {
-
-	public LatentSemantics(String stopwordsKind, String lookupDb,
-			String lookupTable) {
-		super(stopwordsKind, lookupDb, lookupTable);
-		// TODO Auto-generated constructor stub
-	}
-
-	@Override
-	public String predict(ClassifierData cd) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-
-}