Back to LanguageTool Homepage - Privacy - Imprint

Working with language Tool in Grammar & Punctuation Checking


#1

Hi All,
I need your support in developing Grammar & Punctuation Checking of a text.Please do guide me with a steps to follow in developing Grammar & Punctuation Checking task using language Tool.

Regards,
Rohith


(Daniel Naber) #2

Hi, welcome the LanguageTool. Have you seen http://wiki.languagetool.org/development-overview? It describes the syntax of our XML rules. If you have questions, you can post them here in the forum.

Regards
Daniel


#3

How to highlight the spelling and grammar with colors in the Java Server Page same as in language Tool User interface(i.e https://languagetool.org/ ). Please guide us.


(Daniel Naber) #4

Please see http://wiki.languagetool.org/java-api for how to use LT from Java.


#5

We followed the given url and created object Jlanguage as below snippet

JLanguageTool languageTool = getLanguageTool(key.getLanguageKey());
List errors = new ArrayList();
for (RuleMatch match : languageTool.check(text)) {
ContentError error = new ContentError();
error.setSuggestedReplacememts(match.getSuggestedReplacements());
error.setRuleDescrption(match.getRule().getDescription());
}

Now we would like to highlight the match.getRule().getDescription() and match.getSuggestedReplacements() in JSP (not in Swing) with different colors as shown in LT Home page.Please suggest the approach in respective area.