1
0
Fork 0

Added Kiswahili

This commit is contained in:
Marvin Ochieng 2024-04-19 07:03:17 +03:00 committed by Dimo Karaivanov
parent e6e5908dbc
commit 90288713f1
4 changed files with 91107 additions and 3 deletions

View file

@ -0,0 +1,13 @@
locale: sw-TZ
dictionaryFile: sw-utf8.csv
layout:
- [SPECIAL] # 0
- [PUNCTUATION] # 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

@ -139,6 +139,18 @@ public class NaturalLanguage extends Language implements Comparable<NaturalLangu
} }
private String getSortingId() {
switch (getLocale().getLanguage()) {
case "fi":
return "su";
case "sw":
return "ki";
default:
return getLocale().toString();
}
}
@NonNull @NonNull
@Override @Override
public String getAbcString() { public String getAbcString() {
@ -240,8 +252,6 @@ public class NaturalLanguage extends Language implements Comparable<NaturalLangu
@Override @Override
public int compareTo(NaturalLanguage other) { public int compareTo(NaturalLanguage other) {
String key = getLocale().getCountry().equals("FI") ? "su" : getLocale().toString(); return getSortingId().compareTo(other.getSortingId());
String otherKey = other.getLocale().getCountry().equals("FI") ? "su" : other.getLocale().toString();
return key.compareTo(otherKey);
} }
} }

View file

@ -0,0 +1,12 @@
Swahili word frequencies from The Leipzig Corpora Collection:
Source: https://wortschatz.uni-leipzig.de/en/download/Swahili
Version: 2011
License: https://creativecommons.org/licenses/by-nc/4.0/
Swahili wordlist 1 by: marvoh
Source: https://github.com/sspanak/tt9/pull/493
License: Public Domain
Swahili wordlist 2 by: mussacharles60
Source: https://github.com/mussacharles60/swahili-dictionary
License: (MIT) https://github.com/mussacharles60/swahili-dictionary/blob/main/LICENSE