Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-05-12 05:29:02

joomlien
New member
From: Australia
Registered: 2007-05-12
Posts: 3

Analysing words as you type

Hi everyone,

I am new to the xinha world, and first I wanted to congratulate contributors of this fantastic piece of work!

I am greatly interested in Xinha. I would especially like to develop a plugin that analyses words as you're typing the text. By 'analysing' I mean that a program would constantly be running in the background and watching all the words you are typing. Then, that program may give you some options for some of those words. When options are available for a word, this word would automatically get underlined. By clicking on the word a context menu would appear with all the suggestions.

A possible example would be like a spellchecker. In some applications like MS Word, when you mispell a word, that word gets underlined, you can then clik on it to see the correction suggestions and select one to replace the word. That's the sort of stuff I'd like to do.
I don't really want to make a spellchecker but something that would have the same on-the-fly kind of behaviour.

Now, I'd like to get your advice as to know whether similar stuff or plugins already exist for Xinha, and if you think that this is something that would be easy/difficult to develop.

All your hints and advice will be greatly appreciated. Thank you!

All the best.

Julien

Offline

#2 2007-05-13 04:45:33

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Analysing words as you type

Look at plugin SmartReplace, which does just this.

joomlien wrote:

When options are available for a word, this word would automatically get underlined.

You could wrap it in a span with some class

joomlien wrote:

By clicking on the word a context menu would appear with all the suggestions.

The ContextMenu plugin could be extended to to have a kind of API for other plugins.

joomlien wrote:

if you think that this is something that would be easy/difficult to develop.

Surely some JS skills and work involved. Just try it out smile

joomlien wrote:

A possible example would be like a spellchecker

Incidently im planning on a Spellchecker plugin that works just like this smile

Offline

#3 2007-05-13 23:56:51

joomlien
New member
From: Australia
Registered: 2007-05-12
Posts: 3

Re: Analysing words as you type

Hi,

Thanks a lot for your reply.

I'd be keen to give a hand at developing the new spellchecker plugin. I guess it would be a blend of principles that are in the SpellChecker, SmartReplace and ContextMenu.
Let me know if you want a hand.

Also, I tried to have a look at the existing plugins source codes. There are all compressed, the spaces and variable names are stripped out. Is there a full code version available?

Thanks!

Offline

#4 2007-05-14 10:55:21

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Analysing words as you type

joomlien wrote:

Is there a full code version available?

Of course there are. Best is you install a subversion client (e.g. http://tortoise.tigris.org ) and checkout the svn repository at http://svn.xinha.python-hosting.com/trunk/

joomlien wrote:

I guess it would be a blend of principles that are in the SpellChecker, SmartReplace and ContextMenu.

Yes, that's how I imagined it.

joomlien wrote:

Let me know if you want a hand.

Well, I don't even know when I will have the time to do it

When you have any questions (and you will smile ), I will be glad to help you, e.g. at #xinha.

Offline

Board footer

Powered by FluxBB