class AdaptSuggestionsFilter extends RuleFilter {
  
  @Override
  public RuleMatch acceptRuleMatch(RuleMatch match, Map<String, String> arguments, int patternTokenPos,
                                   AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) throws IOException {<FILL_FUNCTION_BODY>}

}

    Rule rule = match.getRule();
    if (rule instanceof AbstractPatternRule) {
      List<String> adjustedSuggestions = new ArrayList<>();
      Language lang = ((AbstractPatternRule) rule).getLanguage();
      for (String replacement : match.getSuggestedReplacements()) {
        adjustedSuggestions.add(lang.adaptSuggestion(replacement));  
      }
      match.setSuggestedReplacements(adjustedSuggestions);
      return match;
    } else {
      return match;
    }
  
<methods>public non-sealed void <init>() ,public abstract org.languagetool.rules.RuleMatch acceptRuleMatch(org.languagetool.rules.RuleMatch, Map<java.lang.String,java.lang.String>, int, org.languagetool.AnalyzedTokenReadings[], List<java.lang.Integer>) throws java.io.IOException,public boolean matches(Map<java.lang.String,java.lang.String>, org.languagetool.AnalyzedTokenReadings[], int, List<java.lang.Integer>) throws java.io.IOException<variables>