Revision: 7318
http://languagetool.svn.sourceforge.net/languagetool/?rev=7318&view=rev
Author: milek_pl
Date: 2012-06-11 17:02:15 +0000 (Mon, 11 Jun 2012)
Log Message:
-----------
track disambiguator actions
Modified Paths:
--------------
trunk/JLanguageTool/CHANGES.txt
trunk/JLanguageTool/src/java/org/languagetool/AnalyzedSentence.java
trunk/JLanguageTool/src/java/org/languagetool/JLanguageTool.java
Modified: trunk/JLanguageTool/CHANGES.txt
===================================================================
--- trunk/JLanguageTool/CHANGES.txt 2012-06-11 08:33:57 UTC (rev 7317)
+++ trunk/JLanguageTool/CHANGES.txt 2012-06-11 17:02:15 UTC (rev 7318)
@@ -71,6 +71,8 @@
simply use "en-US" or "en-GB" as the language code. This implements sf.net
feature
suggestion #3287388.
+ -In verbose mode, the log of the rule-based disambiguator actions is
displayed.
+
-LanguageTool in the standalone version supports now spell-checking via
hunspell.
There are two distribution files: a .zip file for standalone use,
and an .oxt extension for LibreOffice/ApacheOpenOffice. All languages
supported by
Modified: trunk/JLanguageTool/src/java/org/languagetool/AnalyzedSentence.java
===================================================================
--- trunk/JLanguageTool/src/java/org/languagetool/AnalyzedSentence.java
2012-06-11 08:33:57 UTC (rev 7317)
+++ trunk/JLanguageTool/src/java/org/languagetool/AnalyzedSentence.java
2012-06-11 17:02:15 UTC (rev 7318)
@@ -178,6 +178,23 @@
}
/**
+ * Used to display disambiguator actions log.
+ * @return
+ */
+ public final String getAnnotations() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("Disambiguator log: \n");
+ for (final AnalyzedTokenReadings element : tokens) {
+ if (!element.isWhitespace() &&
+ !"".equals(element.getHistoricalAnnotations())) {
+ sb.append(element.getHistoricalAnnotations());
+ sb.append("\n");
+ }
+ }
+ return sb.toString();
+ }
+
+ /**
* @param whPositions the whPositions to set
*/
public void setWhPositions(int[] whPositions) {
Modified: trunk/JLanguageTool/src/java/org/languagetool/JLanguageTool.java
===================================================================
--- trunk/JLanguageTool/src/java/org/languagetool/JLanguageTool.java
2012-06-11 08:33:57 UTC (rev 7317)
+++ trunk/JLanguageTool/src/java/org/languagetool/JLanguageTool.java
2012-06-11 17:02:15 UTC (rev 7318)
@@ -511,6 +511,7 @@
}
printIfVerbose(analyzedText.toString());
+ printIfVerbose(analyzedText.getAnnotations());
final List<RuleMatch> sentenceMatches =
checkAnalyzedSentence(paraMode, allRules, charCount, lineCount,
columnCount, sentence, analyzedText);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs