maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [ANNOUNCE] Auto-Complete Editor (https://talk.maemo.org/showthread.php?t=55884)

Rob1n 2010-06-15 15:21

Re: [ANNOUNCE] Auto-Complete Editor
 
Version 0.0.4 has just been uploaded to the autobuilder, so should be available shortly. It now handles multiple dictionaries in the file, offering a drop-box to select which dictionary to edit (save/revert work on all dictionaries, other operations are on the currently viewed dictionary). The dictionary names are looked up from a static mapping (I can't find these defined anywhere), so there may be some missing (I probably should add error handling for that). There may also still be an issue with character set encoding - I'm using the system encoding to do the translation, which should work but it's not an easy one to test.

Oleg 2010-06-15 17:51

Re: [ANNOUNCE] Auto-Complete Editor
 
alright! the updated version installed I go to the menu and start the application. No crush and no error messages - that's good.
under dictionaries listbox there are 3 of them for me: En (UK), En (US) and Ru
First of all, I'd like to say that cyrillic encoding still doesn't work. Though instead of accented latin vowels (like it was with a new dict.file before the upgrade) I now can see no text at all (empty fields for dictionary items) - I believe they use cp1251 (win-1251) which is (along with utf-8) the most widely used encoding for Russian. I would be able to tell more precisely tomorrow.

Editing En(UK) dictionary worked great for me - adding a new word and saving changes made this word instantly available for autocompletion.

Also, I noticed that all the dictionary items in En(US) doesn't appear in autocompletion and thus is useless for me now.

Well, that's it for now :)

Rob1n 2010-06-15 18:10

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Oleg (Post 716408)
alright! the updated version installed I go to the menu and start the application. No crush and no error messages - that's good.
under dictionaries listbox there are 3 of them for me: En (UK), En (US) and Ru
First of all, I'd like to say that cyrillic encoding still doesn't work. Though instead of accented latin vowels (like it was with a new dict.file before the upgrade) I now can see no text at all (empty fields for dictionary items) - I believe they use cp1251 (win-1251) which is (along with utf-8) the most widely used encoding for Russian. I would be able to tell more precisely tomorrow.

Editing En(UK) dictionary worked great for me - adding a new word and saving changes made this word instantly available for autocompletion.

Also, I noticed that all the dictionary items in En(US) doesn't appear in autocompletion and thus is useless for me now.

Well, that's it for now :)

The dictionaries available for autocompletion are those selected in the "Text input" part of the Settings app. You only have a maximum of 2 available at one time, so you're presumably set to use Ru and En(Uk). You must have had En(Us) selected at one time to end up with words in the dictionary though.

I'm sorry to hear that the cyrillic still isn't working. I'll have to dig further into that one - getting it to display properly isn't a problem, but the issue is figuring out when to do so. The encoding will (presumably) depend on the language selected for the interface, rather than the dictionary language itself (I can quite happily add english words to the russian auto-complete dictionary), so I need to see how I can convert that to a character set to use for decoding.

DaSilva 2010-06-15 18:32

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Rob1n (Post 716246)
Version 0.0.4 has just been uploaded to the autobuilder, so should be available shortly. It now handles multiple dictionaries in the file, offering a drop-box to select which dictionary to edit (save/revert work on all dictionaries, other operations are on the currently viewed dictionary). The dictionary names are looked up from a static mapping (I can't find these defined anywhere), so there may be some missing (I probably should add error handling for that). There may also still be an issue with character set encoding - I'm using the system encoding to do the translation, which should work but it's not an easy one to test.

Thanks for the update, not it works even with my new and complicated dictionary!
Really nice application!
One feature request: Save the last dictionary for the next start.

Rob1n 2010-06-15 21:29

Re: [ANNOUNCE] Auto-Complete Editor
 
Version 0.0.5 & 0.0.6 uploaded now (0.0.6 just changes the location used for the saved settings). Changes are:
  • Added message box to alert user to unidentified dictionaries
  • Limited error messages to two levels of traceback
  • Save last viewed dictionary
  • Changed to use python for locale conversion as Qt was not working

So Oleg, can you give this a try. It works fine with your dictionaries in my tests, so unless the system is using non-default locale settings to write the dictionary, it should now work for you.

Oleg 2010-06-16 00:35

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Rob1n (Post 716667)
So Oleg, can you give this a try. It works fine with your dictionaries in my tests, so unless the system is using non-default locale settings to write the dictionary, it should now work for you.

As for the russian dictionary 0.0.6 doesn't seem to change anything since 0.0.4 on my device (seemingly blank fields where russian words should be)

optional106 2010-06-16 04:46

Re: [ANNOUNCE] Auto-Complete Editor
 
any screenshots of this Auto-Complete Editor in use ?
is there a GUI ? or CLI only ?

DaSilva 2010-06-16 05:44

Re: [ANNOUNCE] Auto-Complete Editor
 
@optional106: http://www.meego.de/images/stories/s...leteeditor.png

@Rob1n: I cannot see umlauts (like δόφί) as well here.
Another feature request: Add an "undo" button or a security question for the delete buttons.

Rob1n 2010-06-16 08:17

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Oleg (Post 716870)
As for the russian dictionary 0.0.6 doesn't seem to change anything since 0.0.4 on my device (seemingly blank fields where russian words should be)

Can you try running from X Terminal:
Code:

LC_ALL=ru_RU.KOI8-R python /opt/AutoCompleteEditor/AutoCompleteEditor.py
Also, if you've saved with the old version, that would've corrupted the dictionary file.

Rob1n 2010-06-16 08:21

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by DaSilva (Post 717060)
@Rob1n: I cannot see umlauts (like δόφί) as well here.
Another feature request: Add an "undo" button or a security question for the delete buttons.

umlauts show up fine here - are these in terms added since the latest version, or prior to that? The previous versions might have saved them incorrectly.

As for an "undo" button - I guess that's possible. You can always use the "revert changes" button, but "undo" might be useful for reverting single changes without rolling back everything else.

EDIT: You're actually running the old version there, so can you also check whether the umlauts work in the current release?

DaSilva 2010-06-16 08:38

Re: [ANNOUNCE] Auto-Complete Editor
 
Yeah I am sorry. That must have been a problem with an older version. Now it works, great!
Instead of undo you could also add a security question for the deletion dialogues if you want to save space.

Oleg 2010-06-16 15:14

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Rob1n (Post 717192)
Can you try running from X Terminal:
Code:

LC_ALL=ru_RU.KOI8-R python /opt/AutoCompleteEditor/AutoCompleteEditor.py
Also, if you've saved with the old version, that would've corrupted the dictionary file.

Great!!!
What I did was
- replacing the file with original one from backup
- "killall hildon-input-method"
- "LC_ALL=ru_RU.cp1251 python /opt/AutoCompleteEditor/AutoCompleteEditor.py"
and it worked :)

So, I had to change it for cp1251 as KOI8-R didn't work (I can't remember any app using KOI8-R since DOS v.5)

Thanks, Robin!

Rob1n 2010-06-16 15:28

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Oleg (Post 717678)
Great!!!
What I did was
- replacing the file with original one from backup
- "killall hildon-input-method"
- "LC_ALL=ru_RU.cp1251 python /opt/AutoCompleteEditor/AutoCompleteEditor.py"
and it worked :)

Does it work without setting LC_ALL? If the system locale isn't set to use cp1251, then I'll probably need to hardcode that when the language is set to ru_RU.

Quote:

Originally Posted by Oleg (Post 717678)
So, I had to change it for cp1251 as KOI8-R didn't work (I can't remember any app using KOI8-R since DOS v.5)

Interesting - it displays fine on my desktop using KOI8-R - not sure whether I tested that on the N900 though. Perhaps that's not available on there (though the Qt documentation certainly suggests that to be the standard encoding for ru_RU).

Oleg 2010-06-16 16:00

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Rob1n (Post 717704)
Does it work without setting LC_ALL? If the system locale isn't set to use cp1251, then I'll probably need to hardcode that when the language is set to ru_RU.


Interesting - it displays fine on my desktop using KOI8-R - not sure whether I tested that on the N900 though. Perhaps that's not available on there (though the Qt documentation certainly suggests that to be the standard encoding for ru_RU).

Just started application from the menu and no, it doesn't show the encoding right.

I tried to open the file from my PC and when I use KOI8-R it does show cyrillic characters but they make no sense (encoding is broken), with cp1251 it works and I can read it.

Flandry 2010-06-16 20:40

Re: [ANNOUNCE] Auto-Complete Editor
 
What a fantastically useful app. It was getting to the point where i was thinking i'd just have to figure out how to delete the whole custom dictionary when i bumped into this thread...

Only thing that i can think of that would improve it is to have it automatically scroll down by one entry each time one is selected (probably difficult requiring change of Qt widget) OR having a continuous "tap to delete" mode. I've got a lot of garbage in the dictionary...

Post when you push it to Testing and i'll go through QA and vote. This ought to be in Extras ASAP. :)

Rob1n 2010-06-16 23:59

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Oleg (Post 717752)
Just started application from the menu and no, it doesn't show the encoding right.

I tried to open the file from my PC and when I use KOI8-R it does show cyrillic characters but they make no sense (encoding is broken), with cp1251 it works and I can read it.

Okay, thanks - I've added a section to override the codec used based on the language setting, so this should be fixed in the next version (there's a couple of other things I want to look at before releasing that though).

Rob1n 2010-06-17 00:02

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Flandry (Post 718161)
Only thing that i can think of that would improve it is to have it automatically scroll down by one entry each time one is selected (probably difficult requiring change of Qt widget) OR having a continuous "tap to delete" mode. I've got a lot of garbage in the dictionary...

Interesting idea - I'll have a look at this. I think it should be possible using the current widget, but I'll need to look at how best to implement it.

Quote:

Originally Posted by Flandry (Post 718161)
Post when you push it to Testing and i'll go through QA and vote. This ought to be in Extras ASAP. :)

Thanks! I've got one or two things to clear up still, then I'll look to push a version to testing.

MPW 2010-06-17 09:05

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Oleg (Post 717678)
- replacing the file with original one from backup

Could you tell me, where I can find the backup file? I crashed my auto complete aswell. When I type specified words, the whole program crashes...

Once I copied the whole /home/user-folder to my SD-Card, so it should be there anywhere...

Thanks!

Bye
MPW

Oleg 2010-06-17 09:26

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by MPW (Post 718901)
Could you tell me, where I can find the backup file? I crashed my auto complete aswell. When I type specified words, the whole program crashes...

Once I copied the whole /home/user-folder to my SD-Card, so it should be there anywhere...

Thanks!

Bye
MPW

hi!
if you have copied the whole user folder it must be under (/home/)user/.osso/dictionaries/.personal.dictionary

Oleg 2010-06-17 11:20

Re: [ANNOUNCE] Auto-Complete Editor
 
try this command (insert the path to your backup folder)
"cp /media/mmc1/<path-to-backup-folder>/.osso/dictionaries/.personal.dictionary /home/user/.osso/dictionaries/.personal.dictionary/.personal.dictionary"

Rob1n 2010-06-17 12:29

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Oleg (Post 719045)
try this command (insert the path to your backup folder)
"cp /media/mmc1/<path-to-backup-folder>/.osso/dictionaries/.personal.dictionary /home/user/.osso/dictionaries/.personal.dictionary/.personal.dictionary"

You've got an extra .personal.dictionary there! Should be:
"cp /media/mmc1/<path-to-backup-folder>/.osso/dictionaries/.personal.dictionary /home/user/.osso/dictionaries/.personal.dictionary"

Rob1n 2010-06-17 12:35

Re: [ANNOUNCE] Auto-Complete Editor
 
Version 0.0.7 has just been pushed to the autobuilder. This has a hardcoded mapping list between locale and encoding used (currently just enforces cp1251 for ru_RU). I've also added in a settings dialog, allowing selection of the delete mode (this is saved between sessions). There's 3 modes defined:
  • Normal - The old method allowing multi-select, then delete on button press
  • Confirm - The same as Normal, but requires confirmation of the deletion
  • OnClick - This automatically deletes entries as soon as they're clicked

I think that sorts out all the bugs & feature requests I've had so far, so, barring any new issues, I'll look to push this version to testing early next week.

Oleg 2010-06-17 14:21

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Rob1n (Post 719127)
You've got an extra .personal.dictionary there! Should be:
"cp /media/mmc1/<path-to-backup-folder>/.osso/dictionaries/.personal.dictionary /home/user/.osso/dictionaries/.personal.dictionary"

my fault

checked 0.0.7 - works fine for me!

Flandry 2010-06-17 15:56

Re: [ANNOUNCE] Auto-Complete Editor
 
The OnClick option was a nice touch. My dictionary is now cleaned up thanks to this. It's amazing how many variations on contractions of "you're" one can type by accident. :P

Do you know if there's a mechanism in the autocomplete to blacklist words/patterns?

Rob1n 2010-06-17 16:01

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Flandry (Post 719363)
The OnClick option was a nice touch. My dictionary is now cleaned up thanks to this. It's amazing how many variations on contractions of "you're" one can type by accident. :P

Do you know if there's a mechanism in the autocomplete to blacklist words/patterns?

I don't think so, no - the file format certainly doesn't suggest any way to do so. You'd need to look at the (closed source) auto-complete implementation to know for sure though. An alternative would be to run a scheduled job to remove any terms matching a given list from the auto-complete dictionary. That should be very straightforward to do - ACE_file.py handles reading/writing the dictionary file, so you'd just need to compare the resulting word list to a blacklist, and remove any offending entries.

pelago 2010-06-17 16:03

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Rob1n (Post 719370)
An alternative would be to run a scheduled job to remove any terms matching a given list from the auto-complete dictionary.

Are there any dbus notifications when an entry is added to the auto-complete dictionary, I wonder, to save polling.

Oleg 2010-06-17 16:26

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Rob1n (Post 719370)
I don't think so, no - the file format certainly doesn't suggest any way to do so. You'd need to look at the (closed source) auto-complete implementation to know for sure though. An alternative would be to run a scheduled job to remove any terms matching a given list from the auto-complete dictionary. That should be very straightforward to do - ACE_file.py handles reading/writing the dictionary file, so you'd just need to compare the resulting word list to a blacklist, and remove any offending entries.

I'd love the x-term command to schedule such job. Having blacklist would be great. Actually having a button "Add to blacklist" in Auto-Complete Editor would be even greater :D (just a suggestion)

Flandry 2010-06-17 16:47

Re: [ANNOUNCE] Auto-Complete Editor
 
Fourth delete mode: delete and blacklist. :)

It's a lot more work but storing such words in a separate list and setting up a cron-ish job to purge from dict once a day would be awesome if you're feeling generous with your time.

I'll be the first to admit there are probably more important problems out there to solve. :D

Rob1n 2010-06-17 17:39

Re: [ANNOUNCE] Auto-Complete Editor
 
I'll have a look at this next week, once the current version's into -testing. It should be easy enough to add command-line options to auto-remove entries from a blacklist. Then an integrated blacklist editor would allow interaction with the blacklist similarly to with the dictionary.

I'm not sure dbus would be too useful for this - there's a lot of race conditions and caching issues involved with trying to change the file at the same time as the system is.

Rob1n 2010-06-21 09:51

Re: [ANNOUNCE] Auto-Complete Editor
 
As no-one's posted any new bugs over the weekend, I've now promoted 0.0.7 to extras-testing. Please give it a test and vote.

I'll hopefully be able to start working on the blacklist functionality tomorrow.

barttech 2010-06-22 16:48

Re: [ANNOUNCE] Auto-Complete Editor
 
Just tried the app, UI is great (though maybe add a type-to-search function as well?). Very useful idea because I think everyone has dictionaries riddled with typo's.

So I mark everything I'd like to delete, click delete selected and hit the save changes button. It say it's saved the file. Then I, for example, begin a new SMS. The SMS UI crashes with an error saying "internal error" as soon as I type one letter (which is when the file is read I suppose). Then I reopen the SMS UI, and the words still pop up. So I tried rebooting, but the words are still there. Strangely enough, the words don't occur in the list in the app anymore.

So what happend? Perhaps when I type the first letter it crashes because it does not have a valid file, and it restores the old one or something?

This is with p1.2, set to Dutch. I tried with the dual dictionary setting and without, same result.

In short, great idea but unfortunately it does not work for me.

ndi 2010-06-22 20:56

Re: [ANNOUNCE] Auto-Complete Editor
 
I don't know if this is the right app, I'm just putting it out there.

Ever since I modified the dictionary, hildon-input-method randomly crashes, pegging the CPU. Can I reset auto-complete to zero, for testing purposes? Can I just use rm on that file up there? Or should I copy it over and replace?

Rob1n 2010-06-22 21:27

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by barttech (Post 725103)
Just tried the app, UI is great (though maybe add a type-to-search function as well?). Very useful idea because I think everyone has dictionaries riddled with typo's.

So I mark everything I'd like to delete, click delete selected and hit the save changes button. It say it's saved the file. Then I, for example, begin a new SMS. The SMS UI crashes with an error saying "internal error" as soon as I type one letter (which is when the file is read I suppose). Then I reopen the SMS UI, and the words still pop up. So I tried rebooting, but the words are still there. Strangely enough, the words don't occur in the list in the app anymore.

So what happend? Perhaps when I type the first letter it crashes because it does not have a valid file, and it restores the old one or something?

This is with p1.2, set to Dutch. I tried with the dual dictionary setting and without, same result.

In short, great idea but unfortunately it does not work for me.

That all sounds rather odd. It's still suggesting words that don't appear in the list in the app? Do all the words show up correctly in the app (with correct accents, etc) or is anything corrupted or missing?

If you have the time, could you please follow the instructions here and send me a copy of a dictionary file with a few entries?

Rob1n 2010-06-22 21:30

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by ndi (Post 725480)
I don't know if this is the right app, I'm just putting it out there.

Ever since I modified the dictionary, hildon-input-method randomly crashes, pegging the CPU. Can I reset auto-complete to zero, for testing purposes? Can I just use rm on that file up there? Or should I copy it over and replace?

You can just remove (either delete or move elsewhere) the files in /home/user/.osso/dictionaries, then either reboot or kill hildon-input-method. If it is this causing the problem, would it be possible to send me a copy of the file?

ndi 2010-06-22 21:39

Re: [ANNOUNCE] Auto-Complete Editor
 
I'll try to locate the issue and, should it be related to the dictionary, I'll report back with a copy. Just wanted to check if this is a known problem.

woody14619 2010-06-22 22:41

Re: [ANNOUNCE] Auto-Complete Editor
 
Love this app! :) One small request:

Would it be possible to tell from the dictionary where new adds started? I would love to be able to look at a list of just new words it's learned since the last time I used the app. That would make it so much easier to work with. I find often about 70% or more of the new words it's learned are typos, but that's only about 5% of the total words. If I could just see the new words I could select them all, then unselect the few I want to keep. :)

Rob1n 2010-06-23 08:03

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by woody14619 (Post 725635)
Love this app! :) One small request:

Would it be possible to tell from the dictionary where new adds started? I would love to be able to look at a list of just new words it's learned since the last time I used the app. That would make it so much easier to work with. I find often about 70% or more of the new words it's learned are typos, but that's only about 5% of the total words. If I could just see the new words I could select them all, then unselect the few I want to keep. :)

Currently the app sorts all entries in alphabetical order. I don't think the order in the original file is related to when it's added either - it looks to be ordered according to when entries were last used (so the oldest entries can be expired when the dictionary becomes full).

Rob1n 2010-06-23 08:40

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by ndi (Post 725546)
I'll try to locate the issue and, should it be related to the dictionary, I'll report back with a copy. Just wanted to check if this is a known problem.

It's not anything I've seen before, no. I've had corrupt files fail to be loaded (causing auto-complete to stop working) but I've not had anything affect the CPU load.

Aranel 2010-06-23 08:44

Re: [ANNOUNCE] Auto-Complete Editor
 
Can you add multi language support for it? :) I am using tr_CY (turkish-l10n community pkg) and app doesn't even start because of it. It should revert back to English, instead of closing itself.

Rob1n 2010-06-23 08:58

Re: [ANNOUNCE] Auto-Complete Editor
 
Quote:

Originally Posted by Aranel (Post 726030)
Can you add multi language support for it? :) I am using tr_CY (turkish-l10n community pkg) and app doesn't even start because of it. It should revert back to English, instead of closing itself.

Can you try running it from X Terminal (python /opt/AutoCompleteEditor/AutoCompleteEditor.py) and see whether it gives any useful error messages? I'll have a look at adding multi-language support (I did have a brief look recently but the obvious methods weren't working), but I don't know why it wouldn't just display in English.


All times are GMT. The time now is 08:18.

vBulletin® Version 3.8.8