Skip to content

Commit

Permalink
[nl] improve rules, add check for _english_ignore_
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-baas committed Mar 15, 2024
1 parent 54de52c commit 572d50c
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ protected String getProhibitFileName() {
public List<RuleMatch> getRuleMatches(String word, int startPos, AnalyzedSentence sentence,
List<RuleMatch> ruleMatchesSoFar, int idx,
AnalyzedTokenReadings[] tokens) throws IOException {
return super.getRuleMatches(word, startPos, sentence, ruleMatchesSoFar, idx, tokens);
}
if (tokens[idx].hasPosTag("_english_ignore_")) {
return Collections.emptyList();
}
return super.getRuleMatches(word, startPos, sentence, ruleMatchesSoFar, idx, tokens);
}

}

Expand Down
Loading

0 comments on commit 572d50c

Please sign in to comment.