donnerpeter commented on a change in pull request #2260:
URL: https://github.com/apache/lucene-solr/pull/2260#discussion_r565907637
##########
File path:
lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/SpellChecker.java
##########
@@ -71,23 +71,39 @@ private boolean checkCaseVariants(char[] wordChars,
WordCase wordCase) {
char[] caseVariant = wordChars;
if (wordCase == WordCase.UPPER) {
caseVariant = stemmer.caseFoldTitle(caseVariant, wordChars.length);
- if (checkWord(caseVariant, wordChars.length, true)) {
+ if (checkWord(caseVariant, wordChars.length, wordCase)) {
return true;
}
char[] aposCase = Stemmer.capitalizeAfterApostrophe(caseVariant,
wordChars.length);
- if (aposCase != null && checkWord(aposCase, aposCase.length, true)) {
+ if (aposCase != null && checkWord(aposCase, aposCase.length, wordCase)) {
return true;
}
+ for (char[] variation : stemmer.sharpSVariations(caseVariant,
wordChars.length)) {
Review comment:
The duplication with `Stemmer`'s case analysis bugs me, and I'm thinking
of ways to avoid it in some future PRs
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]