Search in sources :

Example 1 with PlainTextMapping

use of org.languagetool.dev.wikipedia.PlainTextMapping in project languagetool by languagetool-org.

the class AtomFeedChecker method getMatches.

private List<WikipediaRuleMatch> getMatches(AtomFeedItem item, List<String> texts) throws IOException {
    List<WikipediaRuleMatch> oldMatches = new ArrayList<>();
    for (String text : texts) {
        PlainTextMapping filteredContent = textFilter.filter(text);
        List<RuleMatch> ruleMatches = langTool.check(filteredContent.getPlainText());
        oldMatches.addAll(toWikipediaRuleMatches(text, filteredContent, ruleMatches, item));
    }
    return oldMatches;
}
Also used : PlainTextMapping(org.languagetool.dev.wikipedia.PlainTextMapping) RuleMatch(org.languagetool.rules.RuleMatch)

Aggregations

PlainTextMapping (org.languagetool.dev.wikipedia.PlainTextMapping)1 RuleMatch (org.languagetool.rules.RuleMatch)1