mirror of https://github.com/apache/lucene.git
LUCENE-9784: Hunspell suggestions: use US keyboard in absence of KEY option (#2389)
This commit is contained in:
parent
4bd4f7063b
commit
f83c9862e8
|
@ -161,7 +161,7 @@ public class Dictionary {
|
||||||
private char[] ignore;
|
private char[] ignore;
|
||||||
|
|
||||||
String tryChars = "";
|
String tryChars = "";
|
||||||
String[] neighborKeyGroups = new String[0];
|
String[] neighborKeyGroups = {"qwertyuiop", "asdfghjkl", "zxcvbnm"};
|
||||||
boolean enableSplitSuggestions = true;
|
boolean enableSplitSuggestions = true;
|
||||||
List<RepEntry> repTable = new ArrayList<>();
|
List<RepEntry> repTable = new ArrayList<>();
|
||||||
List<List<String>> mapTable = new ArrayList<>();
|
List<List<String>> mapTable = new ArrayList<>();
|
||||||
|
|
|
@ -212,6 +212,10 @@ public class TestSpellChecking extends StemmerTestBase {
|
||||||
doTest("nosuggest");
|
doTest("nosuggest");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testUseUSKeyboardAsDefaultKeyValue() throws Exception {
|
||||||
|
doTest("keyDefault");
|
||||||
|
}
|
||||||
|
|
||||||
protected void doTest(String name) throws Exception {
|
protected void doTest(String name) throws Exception {
|
||||||
checkSpellCheckerExpectations(
|
checkSpellCheckerExpectations(
|
||||||
Path.of(getClass().getResource(name + ".aff").toURI()).getParent().resolve(name));
|
Path.of(getClass().getResource(name + ".aff").toURI()).getParent().resolve(name));
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
2
|
||||||
|
gab
|
||||||
|
an
|
|
@ -0,0 +1 @@
|
||||||
|
gab, an
|
|
@ -0,0 +1 @@
|
||||||
|
gan
|
Loading…
Reference in New Issue