if (baseform != null) {
token = baseform;
}
}
if (shouldNotAppearWord.containsKey(token)) {
final RuleMatch otherMatch = shouldNotAppearWord.get(token);
final String otherSpelling = otherMatch.getMessage();
final String msg = "'" + token + "' und '" + otherSpelling +
"' sollten nicht gleichzeitig benutzt werden";
final RuleMatch ruleMatch = new RuleMatch(this, pos, pos + origToken.length(), msg);
ruleMatch.setSuggestedReplacement(otherSpelling);
ruleMatches.add(ruleMatch);
} else if (relevantWords.containsKey(token)) {
final String shouldNotAppear = relevantWords.get(token);
// only used to display this spelling variation if the other one really occurs:
final RuleMatch potentialRuleMatch = new RuleMatch(this, pos, pos + origToken.length(), token);
shouldNotAppearWord.put(shouldNotAppear, potentialRuleMatch);
}
}
pos += tmpToken.getToken().length();
}