Neuntrainer App

I have hacked together a little app inspired by the thread about adding words to the XT9 prediction [1].

Features/use cases supported at the moment:

  • Entering a couple of words in the text field
  • Selecting a word in the text field and learning it
  • Copypasting a phrase you have in the clipboard into the text field, and learning all words in it
  • Loading a text file from your phone and learning the words in it

Features that won’t be added (by me, Pull Requests are always welcome):

  • loading things from the net
  • better target language selection: I had an implementation which could detect target language from the current keyboard, but this does not work in SailJail so I dropped it

NOTE: it is unknown whether adding a large number of words to the database has a negative effect in some way. Use reponsibly. After all this is input text prediction, not a thesaurus or dictionary. If you need one of these, use one of these.

You can get it from Sailfishos Chum (best via the app, or at [3]).

You need a licensed version of Sailfish OS to install this, as it depends on the XT9 feature.

Source code and issue tracking available at Codeberg ([2])

[1] Q: How can i bring Predictive Text Input to learn a new word?
[2] nephros/Neuntrainer: A xt9 prediction training tool for Sailfish OS. Binary packages can be found at https://build.sailfishos.org/project/show/sailfishos:chum - Neuntrainer - Codeberg.org
[3] https://build.sailfishos.org/package/show/sailfishos:chum/neuntrainer

9 Likes

Cool! We can learn our words) Didn’t knew about this app for 2 years on Sailfish.

But how to delete some crap words that i occasionally typed from xt9?.. Not all words.

It will be great feature to be abke to correct or delete some words already in the database. Also a backup/export database.

Great initiative, this Neuntrainer app. But I feel the need for a corrector as well, or a possibility to delete words.

At first usage, I wanted to add my last name. Strange enough, it skipped some letters on first try. The second time it did succeed (without changing my entry). But now this Kuweberg has been added?!

Unfortunately I have no idea how to remove stuff from the word list.

Neuntrainer just does the same thing the keyboard does when learning new words.

I believe the database is at /home/nemo/.local/share/xt9/xt9.dlm but it’s binary so a bit hard to check.

The same happened to me, except that it took 3 or 4 attempts before it learned anything at all. It just deleted my input.

May be my fault. I tried to add a regexp to remove punctuation and non-utf8 characters, instead it seems to eat random characters.
Sorry bout that.

1 Like

No reason to be sorry. I’m pretty sure you will fix it, one day or another. :wink:
I find it very useful to finally be able to put some long words that I frequently use, into the database. Words that X9 refused to learn for a very long time, so thank you!

Sorry, that I can’t report a better result:
Words entered using Neuntrainer don’t appear in word suggestions.
Tested 3 words, opeded Jolla Notes, started to type, words don’t come as suggestion, not even if word is yet completely typed. My test words are not stored.
After reboot the same as before.
Any ideas?

X10 / 5.0.0.62

Are you sure you selected the correct language in the app, and when testing use a keyboard with the same language?

2 Likes

No. (twenty characters)

edit: After selecting Target Language = DE and re-entering the words, it works like a charm!
Also this time it confirmed the learned words like on the picture in post #1 .

Thanks very much @nephros !

Eh… So sad, that impossible to delete words…

I tried to learn my simple e-mail in EN vocabulary, “Strip punctuation” is off. Neutrainer said, that word learned, but no effect. No any suggestion in xt9 EN keyboard…

1 Like

E-mail address worked for me… kind of. Despite that Strip punctuation was off, it removed both the dot and the following se.

Edit:
It worked the third time.

So apparently there is a function to clear (all) learned words, and it’s even installed by the package jolla-keyboard-settings-xt9.

But it’s not showing up anywhere in Settings, at least for me.

1 Like

@nephros : I checked this now. A button ‘delete learned words’ is present in ‘Settings - Text input’ between the ‘Split keyboard’ and the ‘Hardware keyboard’ settings on my phone (X10 / 5.0.0.62).

1 Like

Ah, ok. Then maybe the file adding this to the settings has been disabled for non-xt9-equipped devices.

I think so. No paid version → no xt9 → no learned words → nothing to delete → no button.
I other words, no delete button if device never learn any words because it has no xt9.

That button apparently is removed from SFOS 5. I checked my Jolla C with SFOS 4.6 and there it is.
My X10III also is a paid version.

Nope, it’s depending on the selected Keyboards.

If at least one of the out-of-the-box keyboard layouts is enabled, the button appears, if (like me) you only have custom keyboards enabled, it vanishes.

Plus, as said, you have to have the jolla-keyboard-settings-xt9 . package installed.

1 Like

Wrong again! It was just me not using default keyboards. I had them disabled for my own created with extra number row. When I changed back, the button returned, and after reboot it worked. Also on my X10V, not (yet) paid but ‘pirated’ xt9.

Edit:
You beat me by seconds. :wink: