Added Kiswahili
This commit is contained in:
parent
e6e5908dbc
commit
90288713f1
4 changed files with 91107 additions and 3 deletions
13
app/languages/definitions/Kiswahili.yml
Normal file
13
app/languages/definitions/Kiswahili.yml
Normal 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
|
||||
91069
app/languages/dictionaries/sw-utf8.csv
Normal file
91069
app/languages/dictionaries/sw-utf8.csv
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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
|
||||
@Override
|
||||
public String getAbcString() {
|
||||
|
|
@ -240,8 +252,6 @@ public class NaturalLanguage extends Language implements Comparable<NaturalLangu
|
|||
|
||||
@Override
|
||||
public int compareTo(NaturalLanguage other) {
|
||||
String key = getLocale().getCountry().equals("FI") ? "su" : getLocale().toString();
|
||||
String otherKey = other.getLocale().getCountry().equals("FI") ? "su" : other.getLocale().toString();
|
||||
return key.compareTo(otherKey);
|
||||
return getSortingId().compareTo(other.getSortingId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
12
docs/dictionaries/swWordListReadme.txt
Normal file
12
docs/dictionaries/swWordListReadme.txt
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue