class ArabicVerbToMafoulMutlaqFilter extends RuleFilter {

  public ArabicVerbToMafoulMutlaqFilter() {
    this.verb2masdarList = loadFromPath(FILE_NAME);
  }

  private final ArabicTagger tagger = new ArabicTagger();
  private static final String FILE_NAME = "/ar/arabic_verb_masdar.txt";
  private Map<String, List<String>> verb2masdarList;
  private final ArabicSynthesizer synthesizer = new ArabicSynthesizer(new Arabic());


  private final Map<String, String> verb2masdar = new HashMap<String, String>() {{
    // tri letters verb:
    put("عَمِلَ", "عمل");
    put("أَعْمَلَ", "إعمال");
    put("عَمَّلَ", "تعميل");
    put("أَكَلَ", "أكل");
    put("سَأَلَ", "سؤال");
    // regular ones:
    // non tri letters verb
    put("أَجَابَ", "إجابة");
  }};

  @Nullable
  @Override
  public RuleMatch acceptRuleMatch(RuleMatch match, Map<String, String> arguments, int patternTokenPos, AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) {<FILL_FUNCTION_BODY>}


  protected static Map<String, List<String>> loadFromPath(String path) {
    return new SimpleReplaceDataLoader().loadWords(path);
  }
}

    String verb = arguments.get("verb");
    List<String> verbLemmas = tagger.getLemmas(patternTokens[0], "verb");
    String adj = arguments.get("adj");

    // generate multiple masdar from verb lemmas list */

    List<String> inflectedMasdarList = new ArrayList<>();
    List<String> inflectedAdjList = new ArrayList<>();
    String inflectedAdjMasculine = synthesizer.inflectAdjectiveTanwinNasb(adj, false);
    String inflectedAdjfeminin = synthesizer.inflectAdjectiveTanwinNasb(adj, true);
    for (String lemma : verbLemmas) {
      // get sugegsted masdars lemmas
      List<String> msdrLemmaList = verb2masdarList.get(lemma);
      if (msdrLemmaList != null) {

        for (String msdr : msdrLemmaList) {
          if (msdr != null) {
            String inflectedMasdar = synthesizer.inflectMafoulMutlq(msdr);
            inflectedMasdarList.add(inflectedMasdar);
            String inflectedAdj = (msdr.endsWith(Character.toString(TEH_MARBUTA))) ? inflectedAdjfeminin : inflectedAdjMasculine;
            inflectedAdjList.add(inflectedAdj);
          }
        }
      }
    }
    RuleMatch newMatch = new RuleMatch(match.getRule(), match.getSentence(), match.getFromPos(), match.getToPos(), match.getMessage(), match.getShortMessage());
    int i = 0;
    List<String> suggestionPhrases = new ArrayList<>();
    for (String msdr : inflectedMasdarList) {
      String sugPhrase = verb + " " + msdr + " " + inflectedAdjList.get(i);
      // Avoid redundancy
      if (!suggestionPhrases.contains(sugPhrase)) {
        newMatch.addSuggestedReplacement(sugPhrase);
        suggestionPhrases.add(sugPhrase);
      }
      i++;
    }
    return newMatch;
  
<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>