1
0
Fork 0
This commit is contained in:
Dimo Karaivanov 2025-03-10 09:39:25 +02:00 committed by GitHub
parent 7e3d2c0062
commit 91d2476dc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 180542 additions and 4 deletions

View file

@ -0,0 +1,13 @@
locale: ga-IE
dictionaryFile: ga-utf8.csv
layout:
- [SPECIAL] # 0
- [PUNCTUATION_IE] # 1
- [a, b, c, á] # 2
- [d, e, f, é] # 3
- [g, h, i, í] # 4
- [j, k, l] # 5
- [m, n, o, ó] # 6
- [p, q, r, s] # 7
- [t, u, v, ú] # 8
- [w, x, y, z] # 9

File diff suppressed because it is too large Load diff

View file

@ -90,6 +90,7 @@ public class NaturalLanguage extends Language implements Comparable<NaturalLangu
specialChars.put(PUNCTUATION_PLACEHOLDER + "_FR", Characters.PunctuationFrench);
specialChars.put(PUNCTUATION_PLACEHOLDER + "_DE", Characters.PunctuationGerman);
specialChars.put(PUNCTUATION_PLACEHOLDER + "_GR", Characters.PunctuationGreek);
specialChars.put(PUNCTUATION_PLACEHOLDER + "_IE", Characters.PunctuationIrish);
specialChars.put(PUNCTUATION_PLACEHOLDER + "_IN", Characters.PunctuationIndic);
specialChars.put(PUNCTUATION_PLACEHOLDER + "_KR", Characters.PunctuationKorean);

View file

@ -45,10 +45,7 @@ class Punctuation {
",", ".", "-", "(", ")", "&", "~", "`", ";", ":", "'", "\"", "!", "?"
));
// the same as Arabic + ZWNJ
final public static ArrayList<String> PunctuationFarsi = new ArrayList<>(Arrays.asList(
"،", ".", "-", ZWNJ, "(", ")", "&", "~", "`", "'", "\"", "؛", ":", "!", "؟"
));
final public static ArrayList<String> PunctuationFarsi = insertChar(PunctuationArabic, ZWNJ, "-");
final public static ArrayList<String> PunctuationFrench = new ArrayList<>(Arrays.asList(
",", ".", "-", "«", "»", "(", ")", "&", "`", "~", ";", ":", "'", "\"", "!", "?"
@ -62,6 +59,8 @@ class Punctuation {
",", ".", "-", "«", "»", "(", ")", "&", "~", "`", "'", "\"", "·", ":", "!", GR_QUESTION_MARK
));
final public static ArrayList<String> PunctuationIrish = insertChar(PunctuationEnglish, "", "&");
final public static ArrayList<String> PunctuationIndic = new ArrayList<>(Arrays.asList(
",", ".", "-", ZWJ, ZWNJ, "(", ")", "", "", "", "&", "~", "`", ";", ":", "'", "\"", "!", "?"
));
@ -87,4 +86,10 @@ class Punctuation {
|| CombiningPunctuationHindi.contains(ch)
|| CombiningPunctuationHebrew.contains(ch);
}
private static ArrayList<String> insertChar(ArrayList<String> list, String newChar, String afterChar) {
ArrayList<String> newList = new ArrayList<>(list);
newList.add(list.indexOf(afterChar) + 1, newChar);
return newList;
}
}