public class JLanguageToolTest extends TestCase {
// used on http://languagetool.org/java-api/
public void demoCodeForHomepage() throws IOException {
JLanguageTool langTool = new JLanguageTool(new BritishEnglish());
langTool.activateDefaultPatternRules();
List<RuleMatch> matches = langTool.check("A sentence " +
"with a error in the Hitchhiker's Guide tot he Galaxy");
for (RuleMatch match : matches) {
System.out.println("Potential error at line " +