1
0
Fork 0

Fixed word frequency issues causing wrong suggestions order (#164)

* all suggestions are now ordered by length, then by frequency

* word frequency is normalized to 255, instead of to 5; normalization now makes sense

* only maxed out languages are normalized, not all

* all words are normalized at once, instead of only the one that has reached the limit

* normalization now happens on start up, instead of using a trigger

* fixed word frequency not updating when a punctuation mark is appended at the end, for example: 'try,'

* switched the positions of ; and :

* updated documentation
This commit is contained in:
Dimo Karaivanov 2023-01-31 18:14:01 +02:00 committed by GitHub
parent cfe81462e0
commit f6c51d9304
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 78 additions and 27 deletions

View file

@ -57,7 +57,6 @@ To support a new language one needs to:
- `ID` must be the next available number.
- Set `isPunctuationPartOfWords` to `true`, if you need to use the 1-key for typing words, such as: `it's`, `a'tje` or `п'ят`. Otherwise, it would not be possible to type them, nor will they appear as suggestions. `false` will allow faster typing when apostrophes or other punctuation are not part of the words.
- Add the new language to the list in `LanguageCollection.java`. You only need to add it in one place, in the constructor. Please, be nice and maintain the alphabetical order.
- Optionally, translate Traditional T9 in your language, by adding `res/values-your-lang/strings.xml`. The Android Studio translation editor is very handy.
### Dictionary Formats
@ -101,6 +100,10 @@ fifth 3
...
```
## Translating the UI
To translate Traditional T9 menus and messages in your language, add: `res/values-your-lang/strings.xml`. Then use the Android Studio translation editor. It is very handy.
Alternatively, if you don't have Android Studio, you could just use `res/values/strings.xml` as a reference and translate all strings in your file, skipping the ones that have the `translatable="false"` attribute.
## Contribution Process