Package org.languagetool.rules

Examples of org.languagetool.rules.RuleMatchFilter.filter()


          rule.addRuleMatch(thisMatch);
        }
      }
    }
    final RuleMatchFilter filter = new SameRuleGroupFilter();
    return filter.filter(sentenceMatches);
  }

  /**
   * Change RuleMatch positions so they are relative to the complete text,
   * not just to the sentence:
View Full Code Here


        }
      }
      i++;
    }
    RuleMatchFilter maxFilter = new RuleWithMaxFilter();
    List<RuleMatch> filteredMatches = maxFilter.filter(ruleMatches);
    return filteredMatches.toArray(new RuleMatch[filteredMatches.size()]);
  }

  private RuleMatch createRuleMatch(final List<Integer> tokenPositions,
      final AnalyzedTokenReadings[] tokens, final int firstMatchToken,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.