Skip to content

Commit

Permalink
small code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnaber committed Nov 27, 2015
1 parent 40a1710 commit efeb7b9
Showing 1 changed file with 4 additions and 7 deletions.
Expand Up @@ -25,7 +25,6 @@
import org.languagetool.dev.errorcorpus.ErrorSentence;
import org.languagetool.dev.errorcorpus.SimpleCorpus;
import org.languagetool.language.English;
import org.languagetool.languagemodel.LanguageModel;
import org.languagetool.languagemodel.LuceneLanguageModel;
import org.languagetool.markup.AnnotatedText;
import org.languagetool.rules.Rule;
Expand All @@ -44,12 +43,10 @@
*/
public class SimpleCorpusEvaluator {

// without bigrams:
private static final double START_THRESHOLD = 0.000001;
private static final double END_THRESHOLD = 0.00000000000000001;
// with bigrams:
//private static final double START_THRESHOLD = 0.0000000000000000000001;
//private static final double END_THRESHOLD = 0.000000000000000000000000000000001;
private static final double END_THRESHOLD = 0.00000000000000001;
private static final double STEP_FACTOR = 0.1;

private static EnglishNgramProbabilityRule probabilityRule;

private final Evaluator evaluator;
Expand Down Expand Up @@ -200,7 +197,7 @@ public static void main(String[] args) throws IOException {
String precision = String.format(Locale.ENGLISH, "%.3f", res.getPrecision());
String recall = String.format(Locale.ENGLISH, "%.3f", res.getRecall());
results.add(thresholdStr + ": f=" + fMeasureStr + ", precision=" + precision + ", recall=" + recall);
threshold = threshold * 0.1;
threshold = threshold * STEP_FACTOR;
}
System.out.println("=== Results: ==================================");
for (String result : results) {
Expand Down

0 comments on commit efeb7b9

Please sign in to comment.