[jitsi-dev] SpellCheck configuration


#1

Hi Purvesh,

I know that you've started working on the spell check configuration form and wanted to share some thoughts on the subject here. We talked off-list about the existing outdated configuration form, could you please give us some more details, on what are the properties to configure? Do we set dictionaries there? What else?

I was going through some mac chat clients (ichat and adium) and noticed that they do not have a general configuration form for spellchecking, but rather you're able to configure your spellcheck preferences for the current chat (you have a "Spelling and Grammar" item when right clicking in the chat write area). It's very useful, because you're able to change the language for a particular chat and have the spellchecking in english, french, etc. at the same time. Is this something we could do regarding our current spellcheck implementation?

They also have the "Automatic by Language" check, which is very cool, although I'm not sure we can have this easily, so may be we could implement it in a next version. Could you please have a look at the code and tell us if it's feasible at this stage?

Attached you'll find the sub-menu opened when you right click in the chat write area and then on "Spelling and Grammar" item. Also the window (I talked about above) opened when you choose "Show Spelling and Grammar".

Cheers,
Yana


#2

Hi Yana,

Hi Purvesh,

I know that you've started working on the spell check configuration form
and wanted to share some thoughts on the subject here. We talked off-list
about the existing outdated configuration form, could you please give us
some more details, on what are the properties to configure? Do we set
dictionaries there? What else?

The default dictionary is the EN_US one. Additional dictionaries are
downloaded and installed on the fly. So that's something good. I've attached
a screenshot of the part I've been able to port. The second screenshot shows
the list of available dictionaries which are installed when selected ( the
dictionary is downloaded ). I still have to get the dialog box to work.

I was going through some mac chat clients (ichat and adium) and noticed
that they do not have a general configuration form for spellchecking, but
rather you're able to configure your spellcheck preferences for the current
chat (you have a "Spelling and Grammar" item when right clicking in the chat
write area). It's very useful, because you're able to change the language
for a particular chat and have the spellchecking in english, french, etc. at
the same time. Is this something we could do regarding our current
spellcheck implementation?

Yes, this sounds like a plan. I was wondering where the spell check form
would go. This sounds better.

They also have the "Automatic by Language" check, which is very cool,
although I'm not sure we can have this easily, so may be we could implement
it in a next version. Could you please have a look at the code and tell us
if it's feasible at this stage?

I'll take a look and let you know.

Attached you'll find the sub-menu opened when you right click in the chat

write area and then on "Spelling and Grammar" item. Also the window (I
talked about above) opened when you choose "Show Spelling and Grammar".

Cheers,
Yana

Thanks,
Purvesh

···

On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva <yana@jitsi.org> wrote:


#3

Hi Purvesh,

Hi Yana,

Hi Purvesh,

I know that you've started working on the spell check configuration form and wanted to share some thoughts on the subject here. We talked off-list about the existing outdated configuration form, could you please give us some more details, on what are the properties to configure? Do we set dictionaries there? What else?

The default dictionary is the EN_US one. Additional dictionaries are downloaded and installed on the fly. So that's something good.

Sounds good.

I've attached a screenshot of the part I've been able to port.

The second screenshot shows the list of available dictionaries which are installed when selected ( the dictionary is downloaded ). I still have to get the dialog box to work.

Thanks, it's much easier to discuss it when we know where we are!:slight_smile:

It looks good as a start. I would just suggest that we don't put a whole combo box in the chat toolbar. Instead we can show just the country flag of the currently selected dictionary and when clicked show the menu as shown in the second screenshot. You can find this kind of component in the ChatTransportSelectorBox (corresponding to the selection of the protocol in the chat write area) or SmileysSelectorBox (corresponding to the smiley combo box in the chat toolbar), so you can inspire yourself from there.

I was going through some mac chat clients (ichat and adium) and noticed that they do not have a general configuration form for spellchecking, but rather you're able to configure your spellcheck preferences for the current chat (you have a "Spelling and Grammar" item when right clicking in the chat write area). It's very useful, because you're able to change the language for a particular chat and have the spellchecking in english, french, etc. at the same time. Is this something we could do regarding our current spellcheck implementation?

Yes, this sounds like a plan. I was wondering where the spell check form would go. This sounds better.

They also have the "Automatic by Language" check, which is very cool, although I'm not sure we can have this easily, so may be we could implement it in a next version. Could you please have a look at the code and tell us if it's feasible at this stage?

I'll take a look and let you know.

Thanks!

Cheers,
Yana

···

On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:

On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva <yana@jitsi.org> wrote:

Attached you'll find the sub-menu opened when you right click in the chat write area and then on "Spelling and Grammar" item. Also the window (I talked about above) opened when you choose "Show Spelling and Grammar".

Cheers,
Yana

Thanks,
Purvesh

<spellcheck.png><spellcheck-2.png>


#4

Hi everyone,

I've had some discussion with Yana off the list regarding an issue we were
facing with spellcheck. We currently use JMySpell as our spellchecking
library, which is a java implementation of MySpell. The library is pretty
old, and works fine for certain cases, but the word suggestions returned for
misspelled words make no sense at times :confused:
For example, the suggestions for "helo" was "he lo".. So I looked into this
issue, and I shared my findings with Yana. I'm attaching the mail to the dev
list too.

I looked into the issue, and apparently the suggestions aren't
strong/relevant for words which are misspelled towards the end. eg: helo
instead of hello i.e if we miss out the letter before the last letter.

In any case, I went and searched about JMySpell again, and apparently
MySpell is pretty old. Even Oo has moved over to a fork of MySpell viz.
Hunspell. (http://hunspell.sourceforge.net/). I guess even Mozilla uses
hunspell as their spellchecker lib. I looked into hunspell and the good
thing about it is, that it is backward compatible with myspell dictionaries.
But there are no java bindings for hunspell, only jna/jni java bindings. :frowning:
I've tried the jna bindings ( http://dren.dk/hunspell.html ), and the
suggestions are indeed a tad better. But then there are a few downsides. The
jna binaries given above includes a pre-compiled native library which does
not support "adding" words to dictionaries. The only way around this would
be to compile the latest hunspell distribution for different platforms and
include the libraries in the jar.

However, the OmegaT project ( www.omegat.org ) apparently supports hunspell
as well and they have the latest complied libs. To test it, I used the
windows dll from
http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/ instead of the
dll provided in hunspell.jar above. I could then use the add function to add
words to the dictionary. I have tested this.. and it seemed to work fine.
But I have not tested the libs available there for other platforms.

What do you think?

Thanks,
Purvesh

···

On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva <yana@jitsi.org> wrote:

Hi Purvesh,

On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:

> Hi Yana,
>
> On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva <yana@jitsi.org> wrote:
> Hi Purvesh,
>
> I know that you've started working on the spell check configuration form
and wanted to share some thoughts on the subject here. We talked off-list
about the existing outdated configuration form, could you please give us
some more details, on what are the properties to configure? Do we set
dictionaries there? What else?
>
>
> The default dictionary is the EN_US one. Additional dictionaries are
downloaded and installed on the fly. So that's something good.

Sounds good.

> I've attached a screenshot of the part I've been able to port.

> The second screenshot shows the list of available dictionaries which are
installed when selected ( the dictionary is downloaded ). I still have to
get the dialog box to work.

Thanks, it's much easier to discuss it when we know where we are!:slight_smile:

It looks good as a start. I would just suggest that we don't put a whole
combo box in the chat toolbar. Instead we can show just the country flag of
the currently selected dictionary and when clicked show the menu as shown in
the second screenshot. You can find this kind of component in the
ChatTransportSelectorBox (corresponding to the selection of the protocol in
the chat write area) or SmileysSelectorBox (corresponding to the smiley
combo box in the chat toolbar), so you can inspire yourself from there.

>
> I was going through some mac chat clients (ichat and adium) and noticed
that they do not have a general configuration form for spellchecking, but
rather you're able to configure your spellcheck preferences for the current
chat (you have a "Spelling and Grammar" item when right clicking in the chat
write area). It's very useful, because you're able to change the language
for a particular chat and have the spellchecking in english, french, etc. at
the same time. Is this something we could do regarding our current
spellcheck implementation?
>
>
> Yes, this sounds like a plan. I was wondering where the spell check form
would go. This sounds better.
>
> They also have the "Automatic by Language" check, which is very cool,
although I'm not sure we can have this easily, so may be we could implement
it in a next version. Could you please have a look at the code and tell us
if it's feasible at this stage?
>
>
> I'll take a look and let you know.

Thanks!

Cheers,
Yana

>
>
> Attached you'll find the sub-menu opened when you right click in the chat
write area and then on "Spelling and Grammar" item. Also the window (I
talked about above) opened when you choose "Show Spelling and Grammar".
>
> Cheers,
> Yana
>
>
>
>
> Thanks,
> Purvesh
>
> <spellcheck.png><spellcheck-2.png>


#5

Hi guys,

Yana asked me to a take a look at Spark, since they had spellcheck too.
Apparently, they use the same library we use, i.e jmyspell. I tried it out
and the suggestions were fine there. I had contacted the jmyspell dev and he
confirmed that there had been changes to the lib since the version we use. I
tested the latest beta2 libs and the suggestions are indeed better!

I think we can stick to jmyspell for now .

Thanks,
Purvesh

···

On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com> wrote:

Hi everyone,

I've had some discussion with Yana off the list regarding an issue we were
facing with spellcheck. We currently use JMySpell as our spellchecking
library, which is a java implementation of MySpell. The library is pretty
old, and works fine for certain cases, but the word suggestions returned for
misspelled words make no sense at times :confused:
For example, the suggestions for "helo" was "he lo".. So I looked into this
issue, and I shared my findings with Yana. I'm attaching the mail to the dev
list too.

I looked into the issue, and apparently the suggestions aren't
strong/relevant for words which are misspelled towards the end. eg: helo
instead of hello i.e if we miss out the letter before the last letter.

In any case, I went and searched about JMySpell again, and apparently
MySpell is pretty old. Even Oo has moved over to a fork of MySpell viz.
Hunspell. (http://hunspell.sourceforge.net/). I guess even Mozilla uses
hunspell as their spellchecker lib. I looked into hunspell and the good
thing about it is, that it is backward compatible with myspell dictionaries.
But there are no java bindings for hunspell, only jna/jni java bindings. :frowning:
I've tried the jna bindings ( http://dren.dk/hunspell.html ), and the
suggestions are indeed a tad better. But then there are a few downsides. The
jna binaries given above includes a pre-compiled native library which does
not support "adding" words to dictionaries. The only way around this would
be to compile the latest hunspell distribution for different platforms and
include the libraries in the jar.

However, the OmegaT project ( www.omegat.org ) apparently supports
hunspell as well and they have the latest complied libs. To test it, I used
the windows dll from
http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/ instead of
the dll provided in hunspell.jar above. I could then use the add function to
add words to the dictionary. I have tested this.. and it seemed to work
fine. But I have not tested the libs available there for other platforms.

What do you think?

Thanks,
Purvesh

On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva <yana@jitsi.org> wrote:

Hi Purvesh,

On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:

> Hi Yana,
>
> On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva <yana@jitsi.org> wrote:
> Hi Purvesh,
>
> I know that you've started working on the spell check configuration form
and wanted to share some thoughts on the subject here. We talked off-list
about the existing outdated configuration form, could you please give us
some more details, on what are the properties to configure? Do we set
dictionaries there? What else?
>
>
> The default dictionary is the EN_US one. Additional dictionaries are
downloaded and installed on the fly. So that's something good.

Sounds good.

> I've attached a screenshot of the part I've been able to port.

> The second screenshot shows the list of available dictionaries which are
installed when selected ( the dictionary is downloaded ). I still have to
get the dialog box to work.

Thanks, it's much easier to discuss it when we know where we are!:slight_smile:

It looks good as a start. I would just suggest that we don't put a whole
combo box in the chat toolbar. Instead we can show just the country flag of
the currently selected dictionary and when clicked show the menu as shown in
the second screenshot. You can find this kind of component in the
ChatTransportSelectorBox (corresponding to the selection of the protocol in
the chat write area) or SmileysSelectorBox (corresponding to the smiley
combo box in the chat toolbar), so you can inspire yourself from there.

>
> I was going through some mac chat clients (ichat and adium) and noticed
that they do not have a general configuration form for spellchecking, but
rather you're able to configure your spellcheck preferences for the current
chat (you have a "Spelling and Grammar" item when right clicking in the chat
write area). It's very useful, because you're able to change the language
for a particular chat and have the spellchecking in english, french, etc. at
the same time. Is this something we could do regarding our current
spellcheck implementation?
>
>
> Yes, this sounds like a plan. I was wondering where the spell check form
would go. This sounds better.
>
> They also have the "Automatic by Language" check, which is very cool,
although I'm not sure we can have this easily, so may be we could implement
it in a next version. Could you please have a look at the code and tell us
if it's feasible at this stage?
>
>
> I'll take a look and let you know.

Thanks!

Cheers,
Yana

>
>
> Attached you'll find the sub-menu opened when you right click in the
chat write area and then on "Spelling and Grammar" item. Also the window (I
talked about above) opened when you choose "Show Spelling and Grammar".
>
> Cheers,
> Yana
>
>
>
>
> Thanks,
> Purvesh
>
> <spellcheck.png><spellcheck-2.png>


#6

Great news!

Thanks for the update Purvesh! Looking forward to trying it out!

Emil

На 09.06.11 09:10, Purvesh Sahoo написа:

···

Hi guys,

Yana asked me to a take a look at Spark, since they had spellcheck too.
Apparently, they use the same library we use, i.e jmyspell. I tried it
out and the suggestions were fine there. I had contacted the jmyspell
dev and he confirmed that there had been changes to the lib since the
version we use. I tested the latest beta2 libs and the suggestions are
indeed better!

I think we can stick to jmyspell for now .

Thanks,
Purvesh

On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com > <mailto:jimpu2@gmail.com>> wrote:

    Hi everyone,

    I've had some discussion with Yana off the list regarding an issue
    we were facing with spellcheck. We currently use JMySpell as our
    spellchecking library, which is a java implementation of MySpell.
     The library is pretty old, and works fine for certain cases, but
    the word suggestions returned for misspelled words make no sense at
    times :confused:
    For example, the suggestions for "helo" was "he lo".. So I looked
    into this issue, and I shared my findings with Yana. I'm attaching
    the mail to the dev list too.

    I looked into the issue, and apparently the suggestions aren't
    strong/relevant for words which are misspelled towards the end. eg:
    helo instead of hello i.e if we miss out the letter before the last
    letter.

    In any case, I went and searched about JMySpell again, and
    apparently MySpell is pretty old. Even Oo has moved over to a fork
    of MySpell viz. Hunspell. (http://hunspell.sourceforge.net/). I
    guess even Mozilla uses hunspell as their spellchecker lib. I looked
    into hunspell and the good thing about it is, that it is backward
    compatible with myspell dictionaries. But there are no java bindings
    for hunspell, only jna/jni java bindings. :frowning: I've tried the jna
    bindings ( http://dren.dk/hunspell.html ), and the suggestions are
    indeed a tad better. But then there are a few downsides. The jna
    binaries given above includes a pre-compiled native library which
    does not support "adding" words to dictionaries. The only way around
    this would be to compile the latest hunspell distribution for
    different platforms and include the libraries in the jar.

    However, the OmegaT project ( www.omegat.org
    <http://www.omegat.org/> ) apparently supports hunspell as well and
    they have the latest complied libs. To test it, I used the windows
    dll
    from http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/ instead
    of the dll provided in hunspell.jar above. I could then use the add
    function to add words to the dictionary. I have tested this.. and it
    seemed to work fine. But I have not tested the libs available there
    for other platforms.

    What do you think?

    Thanks,
    Purvesh

    On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva <yana@jitsi.org > <mailto:yana@jitsi.org>> wrote:

        Hi Purvesh,

        On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:

        > Hi Yana,
        >
        > On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva > <yana@jitsi.org <mailto:yana@jitsi.org>> wrote:
        > Hi Purvesh,
        >
        > I know that you've started working on the spell check
        configuration form and wanted to share some thoughts on the
        subject here. We talked off-list about the existing outdated
        configuration form, could you please give us some more details,
        on what are the properties to configure? Do we set dictionaries
        there? What else?
        >
        >
        > The default dictionary is the EN_US one. Additional
        dictionaries are downloaded and installed on the fly. So that's
        something good.

        Sounds good.

        > I've attached a screenshot of the part I've been able to port.

        > The second screenshot shows the list of available dictionaries
        which are installed when selected ( the dictionary is downloaded
        ). I still have to get the dialog box to work.

        Thanks, it's much easier to discuss it when we know where we are!:slight_smile:

        It looks good as a start. I would just suggest that we don't put
        a whole combo box in the chat toolbar. Instead we can show just
        the country flag of the currently selected dictionary and when
        clicked show the menu as shown in the second screenshot. You can
        find this kind of component in the ChatTransportSelectorBox
        (corresponding to the selection of the protocol in the chat
        write area) or SmileysSelectorBox (corresponding to the smiley
        combo box in the chat toolbar), so you can inspire yourself from
        there.

        >
        > I was going through some mac chat clients (ichat and adium)
        and noticed that they do not have a general configuration form
        for spellchecking, but rather you're able to configure your
        spellcheck preferences for the current chat (you have a
        "Spelling and Grammar" item when right clicking in the chat
        write area). It's very useful, because you're able to change the
        language for a particular chat and have the spellchecking in
        english, french, etc. at the same time. Is this something we
        could do regarding our current spellcheck implementation?
        >
        >
        > Yes, this sounds like a plan. I was wondering where the spell
        check form would go. This sounds better.
        >
        > They also have the "Automatic by Language" check, which is
        very cool, although I'm not sure we can have this easily, so may
        be we could implement it in a next version. Could you please
        have a look at the code and tell us if it's feasible at this stage?
        >
        >
        > I'll take a look and let you know.

        Thanks!

        Cheers,
        Yana

        >
        >
        > Attached you'll find the sub-menu opened when you right click
        in the chat write area and then on "Spelling and Grammar" item.
        Also the window (I talked about above) opened when you choose
        "Show Spelling and Grammar".
        >
        > Cheers,
        > Yana
        >
        >
        >
        >
        > Thanks,
        > Purvesh
        >
        > <spellcheck.png><spellcheck-2.png>

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
http://jitsi.org FAX: +33.1.77.62.47.31


#7

Hi guys,

Here's a patch with the library I was talking about earlier.

Thanks,
Purvesh

patch.zip (78.2 KB)

···

On Thu, Jun 9, 2011 at 6:05 PM, Emil Ivov <emcho@jitsi.org> wrote:

Great news!

Thanks for the update Purvesh! Looking forward to trying it out!

Emil

На 09.06.11 09:10, Purvesh Sahoo написа:
> Hi guys,
>
> Yana asked me to a take a look at Spark, since they had spellcheck too.
> Apparently, they use the same library we use, i.e jmyspell. I tried it
> out and the suggestions were fine there. I had contacted the jmyspell
> dev and he confirmed that there had been changes to the lib since the
> version we use. I tested the latest beta2 libs and the suggestions are
> indeed better!
>
> I think we can stick to jmyspell for now .
>
> Thanks,
> Purvesh
>
> On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com > > <mailto:jimpu2@gmail.com>> wrote:
>
> Hi everyone,
>
> I've had some discussion with Yana off the list regarding an issue
> we were facing with spellcheck. We currently use JMySpell as our
> spellchecking library, which is a java implementation of MySpell.
> The library is pretty old, and works fine for certain cases, but
> the word suggestions returned for misspelled words make no sense at
> times :confused:
> For example, the suggestions for "helo" was "he lo".. So I looked
> into this issue, and I shared my findings with Yana. I'm attaching
> the mail to the dev list too.
>
> I looked into the issue, and apparently the suggestions aren't
> strong/relevant for words which are misspelled towards the end. eg:
> helo instead of hello i.e if we miss out the letter before the last
> letter.
>
> In any case, I went and searched about JMySpell again, and
> apparently MySpell is pretty old. Even Oo has moved over to a fork
> of MySpell viz. Hunspell. (http://hunspell.sourceforge.net/). I
> guess even Mozilla uses hunspell as their spellchecker lib. I looked
> into hunspell and the good thing about it is, that it is backward
> compatible with myspell dictionaries. But there are no java bindings
> for hunspell, only jna/jni java bindings. :frowning: I've tried the jna
> bindings ( http://dren.dk/hunspell.html ), and the suggestions are
> indeed a tad better. But then there are a few downsides. The jna
> binaries given above includes a pre-compiled native library which
> does not support "adding" words to dictionaries. The only way around
> this would be to compile the latest hunspell distribution for
> different platforms and include the libraries in the jar.
>
> However, the OmegaT project ( www.omegat.org
> <http://www.omegat.org/> ) apparently supports hunspell as well and
> they have the latest complied libs. To test it, I used the windows
> dll
> from http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/instead
> of the dll provided in hunspell.jar above. I could then use the add
> function to add words to the dictionary. I have tested this.. and it
> seemed to work fine. But I have not tested the libs available there
> for other platforms.
>
> What do you think?
>
>
> Thanks,
> Purvesh
>
> On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva <yana@jitsi.org > > <mailto:yana@jitsi.org>> wrote:
>
> Hi Purvesh,
>
> On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:
>
> > Hi Yana,
> >
> > On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva > > <yana@jitsi.org <mailto:yana@jitsi.org>> wrote:
> > Hi Purvesh,
> >
> > I know that you've started working on the spell check
> configuration form and wanted to share some thoughts on the
> subject here. We talked off-list about the existing outdated
> configuration form, could you please give us some more details,
> on what are the properties to configure? Do we set dictionaries
> there? What else?
> >
> >
> > The default dictionary is the EN_US one. Additional
> dictionaries are downloaded and installed on the fly. So that's
> something good.
>
> Sounds good.
>
> > I've attached a screenshot of the part I've been able to port.
>
> > The second screenshot shows the list of available dictionaries
> which are installed when selected ( the dictionary is downloaded
> ). I still have to get the dialog box to work.
>
> Thanks, it's much easier to discuss it when we know where we
are!:slight_smile:
>
> It looks good as a start. I would just suggest that we don't put
> a whole combo box in the chat toolbar. Instead we can show just
> the country flag of the currently selected dictionary and when
> clicked show the menu as shown in the second screenshot. You can
> find this kind of component in the ChatTransportSelectorBox
> (corresponding to the selection of the protocol in the chat
> write area) or SmileysSelectorBox (corresponding to the smiley
> combo box in the chat toolbar), so you can inspire yourself from
> there.
>
> >
> > I was going through some mac chat clients (ichat and adium)
> and noticed that they do not have a general configuration form
> for spellchecking, but rather you're able to configure your
> spellcheck preferences for the current chat (you have a
> "Spelling and Grammar" item when right clicking in the chat
> write area). It's very useful, because you're able to change the
> language for a particular chat and have the spellchecking in
> english, french, etc. at the same time. Is this something we
> could do regarding our current spellcheck implementation?
> >
> >
> > Yes, this sounds like a plan. I was wondering where the spell
> check form would go. This sounds better.
> >
> > They also have the "Automatic by Language" check, which is
> very cool, although I'm not sure we can have this easily, so may
> be we could implement it in a next version. Could you please
> have a look at the code and tell us if it's feasible at this
stage?
> >
> >
> > I'll take a look and let you know.
>
> Thanks!
>
> Cheers,
> Yana
>
> >
> >
> > Attached you'll find the sub-menu opened when you right click
> in the chat write area and then on "Spelling and Grammar" item.
> Also the window (I talked about above) opened when you choose
> "Show Spelling and Grammar".
> >
> > Cheers,
> > Yana
> >
> >
> >
> >
> > Thanks,
> > Purvesh
> >
> > <spellcheck.png><spellcheck-2.png>
>
>
>

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
http://jitsi.org FAX: +33.1.77.62.47.31


#8

Hi Purvesh,

I've just tried your patch and it doesn't work for me. It doesn't compile and give me the following error:

/Users/yanastamcheva/Documents/workspace/jitsinew/src/net/java/sip/communicator/plugin/spellcheck/SpellCheckActivator.java:48: cannot find symbol
    [javac] symbol : class SpellCheckerConfigForm
    [javac] location: class net.java.sip.communicator.plugin.spellcheck.SpellCheckActivator
    [javac] SpellCheckerConfigForm checkerManager =

It seems that you're using the SpellCheckerConfigForm, which doesn't exist in the patch.

Otherwise, could you please format the code, so that it respects the project code convention (http://www.jitsi.org/index.php/Documentation/CodeConvention), use spaces instead of tabs and respect the 80 column? I see that you're using eclipse, so you can use the preconfigured formatter that you'll find on the same page.

Cheers,
Yana

···

On Jun 13, 2011, at 2:44 PM, Purvesh Sahoo wrote:

Hi guys,

Here's a patch with the library I was talking about earlier.

Thanks,
Purvesh

On Thu, Jun 9, 2011 at 6:05 PM, Emil Ivov <emcho@jitsi.org> wrote:
Great news!

Thanks for the update Purvesh! Looking forward to trying it out!

Emil

На 09.06.11 09:10, Purvesh Sahoo написа:
> Hi guys,
>
> Yana asked me to a take a look at Spark, since they had spellcheck too.
> Apparently, they use the same library we use, i.e jmyspell. I tried it
> out and the suggestions were fine there. I had contacted the jmyspell
> dev and he confirmed that there had been changes to the lib since the
> version we use. I tested the latest beta2 libs and the suggestions are
> indeed better!
>
> I think we can stick to jmyspell for now .
>
> Thanks,
> Purvesh
>
> On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com > > <mailto:jimpu2@gmail.com>> wrote:
>
> Hi everyone,
>
> I've had some discussion with Yana off the list regarding an issue
> we were facing with spellcheck. We currently use JMySpell as our
> spellchecking library, which is a java implementation of MySpell.
> The library is pretty old, and works fine for certain cases, but
> the word suggestions returned for misspelled words make no sense at
> times :confused:
> For example, the suggestions for "helo" was "he lo".. So I looked
> into this issue, and I shared my findings with Yana. I'm attaching
> the mail to the dev list too.
>
> I looked into the issue, and apparently the suggestions aren't
> strong/relevant for words which are misspelled towards the end. eg:
> helo instead of hello i.e if we miss out the letter before the last
> letter.
>
> In any case, I went and searched about JMySpell again, and
> apparently MySpell is pretty old. Even Oo has moved over to a fork
> of MySpell viz. Hunspell. (http://hunspell.sourceforge.net/). I
> guess even Mozilla uses hunspell as their spellchecker lib. I looked
> into hunspell and the good thing about it is, that it is backward
> compatible with myspell dictionaries. But there are no java bindings
> for hunspell, only jna/jni java bindings. :frowning: I've tried the jna
> bindings ( http://dren.dk/hunspell.html ), and the suggestions are
> indeed a tad better. But then there are a few downsides. The jna
> binaries given above includes a pre-compiled native library which
> does not support "adding" words to dictionaries. The only way around
> this would be to compile the latest hunspell distribution for
> different platforms and include the libraries in the jar.
>
> However, the OmegaT project ( www.omegat.org
> <http://www.omegat.org/> ) apparently supports hunspell as well and
> they have the latest complied libs. To test it, I used the windows
> dll
> from http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/ instead
> of the dll provided in hunspell.jar above. I could then use the add
> function to add words to the dictionary. I have tested this.. and it
> seemed to work fine. But I have not tested the libs available there
> for other platforms.
>
> What do you think?
>
>
> Thanks,
> Purvesh
>
> On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva <yana@jitsi.org > > <mailto:yana@jitsi.org>> wrote:
>
> Hi Purvesh,
>
> On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:
>
> > Hi Yana,
> >
> > On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva > > <yana@jitsi.org <mailto:yana@jitsi.org>> wrote:
> > Hi Purvesh,
> >
> > I know that you've started working on the spell check
> configuration form and wanted to share some thoughts on the
> subject here. We talked off-list about the existing outdated
> configuration form, could you please give us some more details,
> on what are the properties to configure? Do we set dictionaries
> there? What else?
> >
> >
> > The default dictionary is the EN_US one. Additional
> dictionaries are downloaded and installed on the fly. So that's
> something good.
>
> Sounds good.
>
> > I've attached a screenshot of the part I've been able to port.
>
> > The second screenshot shows the list of available dictionaries
> which are installed when selected ( the dictionary is downloaded
> ). I still have to get the dialog box to work.
>
> Thanks, it's much easier to discuss it when we know where we are!:slight_smile:
>
> It looks good as a start. I would just suggest that we don't put
> a whole combo box in the chat toolbar. Instead we can show just
> the country flag of the currently selected dictionary and when
> clicked show the menu as shown in the second screenshot. You can
> find this kind of component in the ChatTransportSelectorBox
> (corresponding to the selection of the protocol in the chat
> write area) or SmileysSelectorBox (corresponding to the smiley
> combo box in the chat toolbar), so you can inspire yourself from
> there.
>
> >
> > I was going through some mac chat clients (ichat and adium)
> and noticed that they do not have a general configuration form
> for spellchecking, but rather you're able to configure your
> spellcheck preferences for the current chat (you have a
> "Spelling and Grammar" item when right clicking in the chat
> write area). It's very useful, because you're able to change the
> language for a particular chat and have the spellchecking in
> english, french, etc. at the same time. Is this something we
> could do regarding our current spellcheck implementation?
> >
> >
> > Yes, this sounds like a plan. I was wondering where the spell
> check form would go. This sounds better.
> >
> > They also have the "Automatic by Language" check, which is
> very cool, although I'm not sure we can have this easily, so may
> be we could implement it in a next version. Could you please
> have a look at the code and tell us if it's feasible at this stage?
> >
> >
> > I'll take a look and let you know.
>
> Thanks!
>
> Cheers,
> Yana
>
> >
> >
> > Attached you'll find the sub-menu opened when you right click
> in the chat write area and then on "Spelling and Grammar" item.
> Also the window (I talked about above) opened when you choose
> "Show Spelling and Grammar".
> >
> > Cheers,
> > Yana
> >
> >
> >
> >
> > Thanks,
> > Purvesh
> >
> > <spellcheck.png><spellcheck-2.png>
>
>
>

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
http://jitsi.org FAX: +33.1.77.62.47.31

<patch.zip>


#9

Hi Yana,

Woops! Sorry for that. Had a messed up workspace here. I have attached a new
patch. I've also applied the formatter you mentioned.

Thanks,
Purvesh

patch.zip (85.7 KB)

···

On Mon, Jun 20, 2011 at 7:53 PM, Yana Stamcheva <yana@jitsi.org> wrote:

Hi Purvesh,

I've just tried your patch and it doesn't work for me. It doesn't compile
and give me the following error:

>
/Users/yanastamcheva/Documents/workspace/jitsinew/src/net/java/sip/communicator/plugin/spellcheck/SpellCheckActivator.java:48:
cannot find symbol
> [javac] symbol : class SpellCheckerConfigForm
> [javac] location: class
net.java.sip.communicator.plugin.spellcheck.SpellCheckActivator
> [javac] SpellCheckerConfigForm checkerManager =
>

It seems that you're using the SpellCheckerConfigForm, which doesn't exist
in the patch.

Otherwise, could you please format the code, so that it respects the
project code convention (
http://www.jitsi.org/index.php/Documentation/CodeConvention), use spaces
instead of tabs and respect the 80 column? I see that you're using eclipse,
so you can use the preconfigured formatter that you'll find on the same
page.

Cheers,
Yana

On Jun 13, 2011, at 2:44 PM, Purvesh Sahoo wrote:

> Hi guys,
>
> Here's a patch with the library I was talking about earlier.
>
> Thanks,
> Purvesh
>
> On Thu, Jun 9, 2011 at 6:05 PM, Emil Ivov <emcho@jitsi.org> wrote:
> Great news!
>
> Thanks for the update Purvesh! Looking forward to trying it out!
>
> Emil
>
> На 09.06.11 09:10, Purvesh Sahoo написа:
> > Hi guys,
> >
> > Yana asked me to a take a look at Spark, since they had spellcheck too.
> > Apparently, they use the same library we use, i.e jmyspell. I tried it
> > out and the suggestions were fine there. I had contacted the jmyspell
> > dev and he confirmed that there had been changes to the lib since the
> > version we use. I tested the latest beta2 libs and the suggestions are
> > indeed better!
> >
> > I think we can stick to jmyspell for now .
> >
> > Thanks,
> > Purvesh
> >
> > On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com > > > <mailto:jimpu2@gmail.com>> wrote:
> >
> > Hi everyone,
> >
> > I've had some discussion with Yana off the list regarding an issue
> > we were facing with spellcheck. We currently use JMySpell as our
> > spellchecking library, which is a java implementation of MySpell.
> > The library is pretty old, and works fine for certain cases, but
> > the word suggestions returned for misspelled words make no sense at
> > times :confused:
> > For example, the suggestions for "helo" was "he lo".. So I looked
> > into this issue, and I shared my findings with Yana. I'm attaching
> > the mail to the dev list too.
> >
> > I looked into the issue, and apparently the suggestions aren't
> > strong/relevant for words which are misspelled towards the end. eg:
> > helo instead of hello i.e if we miss out the letter before the
last
> > letter.
> >
> > In any case, I went and searched about JMySpell again, and
> > apparently MySpell is pretty old. Even Oo has moved over to a fork
> > of MySpell viz. Hunspell. (http://hunspell.sourceforge.net/). I
> > guess even Mozilla uses hunspell as their spellchecker lib. I
looked
> > into hunspell and the good thing about it is, that it is backward
> > compatible with myspell dictionaries. But there are no java
bindings
> > for hunspell, only jna/jni java bindings. :frowning: I've tried the jna
> > bindings ( http://dren.dk/hunspell.html ), and the suggestions are
> > indeed a tad better. But then there are a few downsides. The jna
> > binaries given above includes a pre-compiled native library which
> > does not support "adding" words to dictionaries. The only way
around
> > this would be to compile the latest hunspell distribution for
> > different platforms and include the libraries in the jar.
> >
> > However, the OmegaT project ( www.omegat.org
> > <http://www.omegat.org/> ) apparently supports hunspell as well
and
> > they have the latest complied libs. To test it, I used the windows
> > dll
> > from http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/instead
> > of the dll provided in hunspell.jar above. I could then use the add
> > function to add words to the dictionary. I have tested this.. and
it
> > seemed to work fine. But I have not tested the libs available there
> > for other platforms.
> >
> > What do you think?
> >
> >
> > Thanks,
> > Purvesh
> >
> > On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva <yana@jitsi.org > > > <mailto:yana@jitsi.org>> wrote:
> >
> > Hi Purvesh,
> >
> > On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:
> >
> > > Hi Yana,
> > >
> > > On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva > > > <yana@jitsi.org <mailto:yana@jitsi.org>> wrote:
> > > Hi Purvesh,
> > >
> > > I know that you've started working on the spell check
> > configuration form and wanted to share some thoughts on the
> > subject here. We talked off-list about the existing outdated
> > configuration form, could you please give us some more details,
> > on what are the properties to configure? Do we set dictionaries
> > there? What else?
> > >
> > >
> > > The default dictionary is the EN_US one. Additional
> > dictionaries are downloaded and installed on the fly. So that's
> > something good.
> >
> > Sounds good.
> >
> > > I've attached a screenshot of the part I've been able to
port.
> >
> > > The second screenshot shows the list of available
dictionaries
> > which are installed when selected ( the dictionary is
downloaded
> > ). I still have to get the dialog box to work.
> >
> > Thanks, it's much easier to discuss it when we know where we
are!:slight_smile:
> >
> > It looks good as a start. I would just suggest that we don't
put
> > a whole combo box in the chat toolbar. Instead we can show just
> > the country flag of the currently selected dictionary and when
> > clicked show the menu as shown in the second screenshot. You
can
> > find this kind of component in the ChatTransportSelectorBox
> > (corresponding to the selection of the protocol in the chat
> > write area) or SmileysSelectorBox (corresponding to the smiley
> > combo box in the chat toolbar), so you can inspire yourself
from
> > there.
> >
> > >
> > > I was going through some mac chat clients (ichat and adium)
> > and noticed that they do not have a general configuration form
> > for spellchecking, but rather you're able to configure your
> > spellcheck preferences for the current chat (you have a
> > "Spelling and Grammar" item when right clicking in the chat
> > write area). It's very useful, because you're able to change
the
> > language for a particular chat and have the spellchecking in
> > english, french, etc. at the same time. Is this something we
> > could do regarding our current spellcheck implementation?
> > >
> > >
> > > Yes, this sounds like a plan. I was wondering where the spell
> > check form would go. This sounds better.
> > >
> > > They also have the "Automatic by Language" check, which is
> > very cool, although I'm not sure we can have this easily, so
may
> > be we could implement it in a next version. Could you please
> > have a look at the code and tell us if it's feasible at this
stage?
> > >
> > >
> > > I'll take a look and let you know.
> >
> > Thanks!
> >
> > Cheers,
> > Yana
> >
> > >
> > >
> > > Attached you'll find the sub-menu opened when you right click
> > in the chat write area and then on "Spelling and Grammar" item.
> > Also the window (I talked about above) opened when you choose
> > "Show Spelling and Grammar".
> > >
> > > Cheers,
> > > Yana
> > >
> > >
> > >
> > >
> > > Thanks,
> > > Purvesh
> > >
> > > <spellcheck.png><spellcheck-2.png>
> >
> >
> >
>
> --
> Emil Ivov, Ph.D. 67000 Strasbourg,
> Project Lead France
> Jitsi
> emcho@jitsi.org PHONE: +33.1.77.62.43.30
> http://jitsi.org FAX: +33.1.77.62.47.31
>
>
> <patch.zip>


#10

Hi Purvesh,

It works now! Good work!!

Here is a list of some small issues we should fix before enabling the spellcheck:)

- I get the following exception each time I click with the right mouse button on an empty write area. It appears that we try to make spell check even that there's no text.

[java] 12:08:04.449 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message was: String index out of range: -1
     [java] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
     [java] at java.lang.String.substring(String.java:1931)
     [java] at net.java.sip.communicator.plugin.spellcheck.Word.getWord(Word.java:55)
     [java] at net.java.sip.communicator.plugin.spellcheck.ChatAttachments$2.getMenuElements(ChatAttachments.java:104)
     [java] at net.java.sip.communicator.impl.gui.main.chat.ChatWritePanel.mouseClicked(ChatWritePanel.java:626)
     [java] at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
     [java] at java.awt.Component.processMouseEvent(Component.java:6377)

- Could you please rename the right button menu item "SpellCheck" to "Show Spelling and Grammar" and the corresponding window to "Spelling and Grammar".

- The "Show Spelling and Grammar" item in the right click menu should appear even if we're not over a text ( click on the empty space of the write area ).

- In the "Spelling ang Grammar" window, the "Find next" button doesn't work (it also prints "false" on the terminal). When clicked, the next wrong word should be shown in the text field on the left. When we're at the end of the sentence it should go back to the first word. Also, please remove the debug print:)

- In the "Spelling ang Grammar" window, when you double click on one of the suggestions it should do "Replace".

- When we choose a language that is not found we get the attached error window. There are some missing strings that should be added to the resources.properties file. And the link shown in the window, points to the Damian's home page. Could you please explain us the process of downloading new dictionaries? We should make it quite easy for the user to do that.

Otherwise I haven't yet looked at the code, but I'll try to review it while we're working on the above issues.

Cheers,
Yana


#11

Hi Yana,

Thanks for pointing out the bugs! I've added replies inline:)

Hi Purvesh,

It works now! Good work!!

Here is a list of some small issues we should fix before enabling the
spellcheck:)

- I get the following exception each time I click with the right mouse
button on an empty write area. It appears that we try to make spell check
even that there's no text.

> [java] 12:08:04.449 SEVERE: util.UtilActivator.uncaughtException().88 An
uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and
message was: String index out of range: -1
> [java] java.lang.StringIndexOutOfBoundsException: String index out
of range: -1
> [java] at java.lang.String.substring(String.java:1931)
> [java] at
net.java.sip.communicator.plugin.spellcheck.Word.getWord(Word.java:55)
> [java] at
net.java.sip.communicator.plugin.spellcheck.ChatAttachments$2.getMenuElements(ChatAttachments.java:104)
> [java] at
net.java.sip.communicator.impl.gui.main.chat.ChatWritePanel.mouseClicked(ChatWritePanel.java:626)
> [java] at
java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
> [java] at
java.awt.Component.processMouseEvent(Component.java:6377)
>

- Could you please rename the right button menu item "SpellCheck" to "Show
Spelling and Grammar" and the corresponding window to "Spelling and
Grammar".

Fixed! :slight_smile:

- The "Show Spelling and Grammar" item in the right click menu should
appear even if we're not over a text ( click on the empty space of the write
area ).

Ok. But what do you we show in the Spelling and Grammar window? The first
misspelled word selected and the corresponding suggestions? What do we show,
in case there are no misspelled words?

- In the "Spelling ang Grammar" window, the "Find next" button doesn't work
(it also prints "false" on the terminal). When clicked, the next wrong word
should be shown in the text field on the left. When we're at the end of the
sentence it should go back to the first word. Also, please remove the debug
print:)

Woops! Debug print removed and fixed! Actually, I perceived this
differently. The current implementation was to fetch the suggestions for a
word which the user might *type* into the textbox. But what you said makes
more sense. I've modified it!

- In the "Spelling ang Grammar" window, when you double click on one of the
suggestions it should do "Replace".

I had planned this, but it slipped from my mind. Thanks for reminding. I'll
add this :slight_smile:

- When we choose a language that is not found we get the attached error
window. There are some missing strings that should be added to the
resources.properties file. And the link shown in the window, points to the
Damian's home page. Could you please explain us the process of downloading
new dictionaries? We should make it quite easy for the user to do that.

Oh yeah. I must have missed those while porting the old code. I've added
those strings now. The dictionaries sources are listed in
resources/spellcheck/parameters.xml Damian had hosted a few dictionaries on
his website and hence his website link was shown in the error message, when
those dictionaries were not found there. The sources are listed here:
http://wiki.services.openoffice.org/wiki/Dictionaries We could update the
URLs to the latest location. :slight_smile:

Thanks,
Purvesh

···

On Wed, Jun 22, 2011 at 3:15 PM, Yana Stamcheva <yana@jitsi.org> wrote:

Otherwise I haven't yet looked at the code, but I'll try to review it while
we're working on the above issues.

Cheers,
Yana

On Jun 21, 2011, at 5:58 PM, Purvesh Sahoo wrote:

> Hi Yana,
>
> Woops! Sorry for that. Had a messed up workspace here. I have attached a
new patch. I've also applied the formatter you mentioned.
>
> Thanks,
> Purvesh
>
> On Mon, Jun 20, 2011 at 7:53 PM, Yana Stamcheva <yana@jitsi.org> wrote:
> Hi Purvesh,
>
> I've just tried your patch and it doesn't work for me. It doesn't compile
and give me the following error:
>
> >
/Users/yanastamcheva/Documents/workspace/jitsinew/src/net/java/sip/communicator/plugin/spellcheck/SpellCheckActivator.java:48:
cannot find symbol
> > [javac] symbol : class SpellCheckerConfigForm
> > [javac] location: class
net.java.sip.communicator.plugin.spellcheck.SpellCheckActivator
> > [javac] SpellCheckerConfigForm checkerManager =
> >
>
> It seems that you're using the SpellCheckerConfigForm, which doesn't
exist in the patch.
>
> Otherwise, could you please format the code, so that it respects the
project code convention (
http://www.jitsi.org/index.php/Documentation/CodeConvention), use spaces
instead of tabs and respect the 80 column? I see that you're using eclipse,
so you can use the preconfigured formatter that you'll find on the same
page.
>
> Cheers,
> Yana
>
> On Jun 13, 2011, at 2:44 PM, Purvesh Sahoo wrote:
>
> > Hi guys,
> >
> > Here's a patch with the library I was talking about earlier.
> >
> > Thanks,
> > Purvesh
> >
> > On Thu, Jun 9, 2011 at 6:05 PM, Emil Ivov <emcho@jitsi.org> wrote:
> > Great news!
> >
> > Thanks for the update Purvesh! Looking forward to trying it out!
> >
> > Emil
> >
> > На 09.06.11 09:10, Purvesh Sahoo написа:
> > > Hi guys,
> > >
> > > Yana asked me to a take a look at Spark, since they had spellcheck
too.
> > > Apparently, they use the same library we use, i.e jmyspell. I tried
it
> > > out and the suggestions were fine there. I had contacted the jmyspell
> > > dev and he confirmed that there had been changes to the lib since the
> > > version we use. I tested the latest beta2 libs and the suggestions
are
> > > indeed better!
> > >
> > > I think we can stick to jmyspell for now .
> > >
> > > Thanks,
> > > Purvesh
> > >
> > > On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com > > > > <mailto:jimpu2@gmail.com>> wrote:
> > >
> > > Hi everyone,
> > >
> > > I've had some discussion with Yana off the list regarding an
issue
> > > we were facing with spellcheck. We currently use JMySpell as our
> > > spellchecking library, which is a java implementation of MySpell.
> > > The library is pretty old, and works fine for certain cases, but
> > > the word suggestions returned for misspelled words make no sense
at
> > > times :confused:
> > > For example, the suggestions for "helo" was "he lo".. So I looked
> > > into this issue, and I shared my findings with Yana. I'm
attaching
> > > the mail to the dev list too.
> > >
> > > I looked into the issue, and apparently the suggestions aren't
> > > strong/relevant for words which are misspelled towards the end.
eg:
> > > helo instead of hello i.e if we miss out the letter before the
last
> > > letter.
> > >
> > > In any case, I went and searched about JMySpell again, and
> > > apparently MySpell is pretty old. Even Oo has moved over to a
fork
> > > of MySpell viz. Hunspell. (http://hunspell.sourceforge.net/). I
> > > guess even Mozilla uses hunspell as their spellchecker lib. I
looked
> > > into hunspell and the good thing about it is, that it is backward
> > > compatible with myspell dictionaries. But there are no java
bindings
> > > for hunspell, only jna/jni java bindings. :frowning: I've tried the jna
> > > bindings ( http://dren.dk/hunspell.html ), and the suggestions
are
> > > indeed a tad better. But then there are a few downsides. The jna
> > > binaries given above includes a pre-compiled native library which
> > > does not support "adding" words to dictionaries. The only way
around
> > > this would be to compile the latest hunspell distribution for
> > > different platforms and include the libraries in the jar.
> > >
> > > However, the OmegaT project ( www.omegat.org
> > > <http://www.omegat.org/> ) apparently supports hunspell as well
and
> > > they have the latest complied libs. To test it, I used the
windows
> > > dll
> > > from
http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/ instead
> > > of the dll provided in hunspell.jar above. I could then use the
add
> > > function to add words to the dictionary. I have tested this.. and
it
> > > seemed to work fine. But I have not tested the libs available
there
> > > for other platforms.
> > >
> > > What do you think?
> > >
> > >
> > > Thanks,
> > > Purvesh
> > >
> > > On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva <yana@jitsi.org > > > > <mailto:yana@jitsi.org>> wrote:
> > >
> > > Hi Purvesh,
> > >
> > > On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:
> > >
> > > > Hi Yana,
> > > >
> > > > On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva > > > > <yana@jitsi.org <mailto:yana@jitsi.org>> wrote:
> > > > Hi Purvesh,
> > > >
> > > > I know that you've started working on the spell check
> > > configuration form and wanted to share some thoughts on the
> > > subject here. We talked off-list about the existing outdated
> > > configuration form, could you please give us some more
details,
> > > on what are the properties to configure? Do we set
dictionaries
> > > there? What else?
> > > >
> > > >
> > > > The default dictionary is the EN_US one. Additional
> > > dictionaries are downloaded and installed on the fly. So
that's
> > > something good.
> > >
> > > Sounds good.
> > >
> > > > I've attached a screenshot of the part I've been able to
port.
> > >
> > > > The second screenshot shows the list of available
dictionaries
> > > which are installed when selected ( the dictionary is
downloaded
> > > ). I still have to get the dialog box to work.
> > >
> > > Thanks, it's much easier to discuss it when we know where we
are!:slight_smile:
> > >
> > > It looks good as a start. I would just suggest that we don't
put
> > > a whole combo box in the chat toolbar. Instead we can show
just
> > > the country flag of the currently selected dictionary and
when
> > > clicked show the menu as shown in the second screenshot. You
can
> > > find this kind of component in the ChatTransportSelectorBox
> > > (corresponding to the selection of the protocol in the chat
> > > write area) or SmileysSelectorBox (corresponding to the
smiley
> > > combo box in the chat toolbar), so you can inspire yourself
from
> > > there.
> > >
> > > >
> > > > I was going through some mac chat clients (ichat and adium)
> > > and noticed that they do not have a general configuration
form
> > > for spellchecking, but rather you're able to configure your
> > > spellcheck preferences for the current chat (you have a
> > > "Spelling and Grammar" item when right clicking in the chat
> > > write area). It's very useful, because you're able to change
the
> > > language for a particular chat and have the spellchecking in
> > > english, french, etc. at the same time. Is this something we
> > > could do regarding our current spellcheck implementation?
> > > >
> > > >
> > > > Yes, this sounds like a plan. I was wondering where the
spell
> > > check form would go. This sounds better.
> > > >
> > > > They also have the "Automatic by Language" check, which is
> > > very cool, although I'm not sure we can have this easily, so
may
> > > be we could implement it in a next version. Could you please
> > > have a look at the code and tell us if it's feasible at this
stage?
> > > >
> > > >
> > > > I'll take a look and let you know.
> > >
> > > Thanks!
> > >
> > > Cheers,
> > > Yana
> > >
> > > >
> > > >
> > > > Attached you'll find the sub-menu opened when you right
click
> > > in the chat write area and then on "Spelling and Grammar"
item.
> > > Also the window (I talked about above) opened when you choose
> > > "Show Spelling and Grammar".
> > > >
> > > > Cheers,
> > > > Yana
> > > >
> > > >
> > > >
> > > >
> > > > Thanks,
> > > > Purvesh
> > > >
> > > > <spellcheck.png><spellcheck-2.png>
> > >
> > >
> > >
> >
> > --
> > Emil Ivov, Ph.D. 67000 Strasbourg,
> > Project Lead France
> > Jitsi
> > emcho@jitsi.org PHONE: +33.1.77.62.43.30
> > http://jitsi.org FAX: +33.1.77.62.47.31
> >
> >
> > <patch.zip>
>
>
> <patch.zip>


#12

Hi Purvesh,

Hi Yana,

Thanks for pointing out the bugs! I've added replies inline:)

Hi Purvesh,

It works now! Good work!!

Here is a list of some small issues we should fix before enabling the spellcheck:)

- I get the following exception each time I click with the right mouse button on an empty write area. It appears that we try to make spell check even that there's no text.

> [java] 12:08:04.449 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message was: String index out of range: -1
> [java] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> [java] at java.lang.String.substring(String.java:1931)
> [java] at net.java.sip.communicator.plugin.spellcheck.Word.getWord(Word.java:55)
> [java] at net.java.sip.communicator.plugin.spellcheck.ChatAttachments$2.getMenuElements(ChatAttachments.java:104)
> [java] at net.java.sip.communicator.impl.gui.main.chat.ChatWritePanel.mouseClicked(ChatWritePanel.java:626)
> [java] at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
> [java] at java.awt.Component.processMouseEvent(Component.java:6377)
>

- Could you please rename the right button menu item "SpellCheck" to "Show Spelling and Grammar" and the corresponding window to "Spelling and Grammar".

Fixed! :slight_smile:

- The "Show Spelling and Grammar" item in the right click menu should appear even if we're not over a text ( click on the empty space of the write area ).

Ok. But what do you we show in the Spelling and Grammar window? The first misspelled word selected and the corresponding suggestions? What do we show, in case there are no misspelled words?

Yes, we show the first misspelled word and nothing if no errors were found.

If the user opens the Spelling and Grammar window and leaves it open, they could continue typing the message and the window will be updated with the new misspelled word if any.

- In the "Spelling ang Grammar" window, the "Find next" button doesn't work (it also prints "false" on the terminal). When clicked, the next wrong word should be shown in the text field on the left. When we're at the end of the sentence it should go back to the first word. Also, please remove the debug print:)

Woops! Debug print removed and fixed! Actually, I perceived this differently. The current implementation was to fetch the suggestions for a word which the user might *type* into the textbox. But what you said makes more sense. I've modified it!

- In the "Spelling ang Grammar" window, when you double click on one of the suggestions it should do "Replace".

I had planned this, but it slipped from my mind. Thanks for reminding. I'll add this :slight_smile:

- When we choose a language that is not found we get the attached error window. There are some missing strings that should be added to the resources.properties file. And the link shown in the window, points to the Damian's home page. Could you please explain us the process of downloading new dictionaries? We should make it quite easy for the user to do that.

Oh yeah. I must have missed those while porting the old code. I've added those strings now. The dictionaries sources are listed in resources/spellcheck/parameters.xml Damian had hosted a few dictionaries on his website and hence his website link was shown in the error message, when those dictionaries were not found there. The sources are listed here: http://wiki.services.openoffice.org/wiki/Dictionaries We could update the URLs to the latest location. :slight_smile:

Yes please, do so:)

Thanks!
Yana

···

On Jun 23, 2011, at 3:32 PM, Purvesh Sahoo wrote:

On Wed, Jun 22, 2011 at 3:15 PM, Yana Stamcheva <yana@jitsi.org> wrote:

Thanks,
Purvesh

Otherwise I haven't yet looked at the code, but I'll try to review it while we're working on the above issues.

Cheers,
Yana

On Jun 21, 2011, at 5:58 PM, Purvesh Sahoo wrote:

> Hi Yana,
>
> Woops! Sorry for that. Had a messed up workspace here. I have attached a new patch. I've also applied the formatter you mentioned.
>
> Thanks,
> Purvesh
>
> On Mon, Jun 20, 2011 at 7:53 PM, Yana Stamcheva <yana@jitsi.org> wrote:
> Hi Purvesh,
>
> I've just tried your patch and it doesn't work for me. It doesn't compile and give me the following error:
>
> > /Users/yanastamcheva/Documents/workspace/jitsinew/src/net/java/sip/communicator/plugin/spellcheck/SpellCheckActivator.java:48: cannot find symbol
> > [javac] symbol : class SpellCheckerConfigForm
> > [javac] location: class net.java.sip.communicator.plugin.spellcheck.SpellCheckActivator
> > [javac] SpellCheckerConfigForm checkerManager =
> >
>
> It seems that you're using the SpellCheckerConfigForm, which doesn't exist in the patch.
>
> Otherwise, could you please format the code, so that it respects the project code convention (http://www.jitsi.org/index.php/Documentation/CodeConvention), use spaces instead of tabs and respect the 80 column? I see that you're using eclipse, so you can use the preconfigured formatter that you'll find on the same page.
>
> Cheers,
> Yana
>
> On Jun 13, 2011, at 2:44 PM, Purvesh Sahoo wrote:
>
> > Hi guys,
> >
> > Here's a patch with the library I was talking about earlier.
> >
> > Thanks,
> > Purvesh
> >
> > On Thu, Jun 9, 2011 at 6:05 PM, Emil Ivov <emcho@jitsi.org> wrote:
> > Great news!
> >
> > Thanks for the update Purvesh! Looking forward to trying it out!
> >
> > Emil
> >
> > На 09.06.11 09:10, Purvesh Sahoo написа:
> > > Hi guys,
> > >
> > > Yana asked me to a take a look at Spark, since they had spellcheck too.
> > > Apparently, they use the same library we use, i.e jmyspell. I tried it
> > > out and the suggestions were fine there. I had contacted the jmyspell
> > > dev and he confirmed that there had been changes to the lib since the
> > > version we use. I tested the latest beta2 libs and the suggestions are
> > > indeed better!
> > >
> > > I think we can stick to jmyspell for now .
> > >
> > > Thanks,
> > > Purvesh
> > >
> > > On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com > > > > <mailto:jimpu2@gmail.com>> wrote:
> > >
> > > Hi everyone,
> > >
> > > I've had some discussion with Yana off the list regarding an issue
> > > we were facing with spellcheck. We currently use JMySpell as our
> > > spellchecking library, which is a java implementation of MySpell.
> > > The library is pretty old, and works fine for certain cases, but
> > > the word suggestions returned for misspelled words make no sense at
> > > times :confused:
> > > For example, the suggestions for "helo" was "he lo".. So I looked
> > > into this issue, and I shared my findings with Yana. I'm attaching
> > > the mail to the dev list too.
> > >
> > > I looked into the issue, and apparently the suggestions aren't
> > > strong/relevant for words which are misspelled towards the end. eg:
> > > helo instead of hello i.e if we miss out the letter before the last
> > > letter.
> > >
> > > In any case, I went and searched about JMySpell again, and
> > > apparently MySpell is pretty old. Even Oo has moved over to a fork
> > > of MySpell viz. Hunspell. (http://hunspell.sourceforge.net/). I
> > > guess even Mozilla uses hunspell as their spellchecker lib. I looked
> > > into hunspell and the good thing about it is, that it is backward
> > > compatible with myspell dictionaries. But there are no java bindings
> > > for hunspell, only jna/jni java bindings. :frowning: I've tried the jna
> > > bindings ( http://dren.dk/hunspell.html ), and the suggestions are
> > > indeed a tad better. But then there are a few downsides. The jna
> > > binaries given above includes a pre-compiled native library which
> > > does not support "adding" words to dictionaries. The only way around
> > > this would be to compile the latest hunspell distribution for
> > > different platforms and include the libraries in the jar.
> > >
> > > However, the OmegaT project ( www.omegat.org
> > > <http://www.omegat.org/> ) apparently supports hunspell as well and
> > > they have the latest complied libs. To test it, I used the windows
> > > dll
> > > from http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/ instead
> > > of the dll provided in hunspell.jar above. I could then use the add
> > > function to add words to the dictionary. I have tested this.. and it
> > > seemed to work fine. But I have not tested the libs available there
> > > for other platforms.
> > >
> > > What do you think?
> > >
> > >
> > > Thanks,
> > > Purvesh
> > >
> > > On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva <yana@jitsi.org > > > > <mailto:yana@jitsi.org>> wrote:
> > >
> > > Hi Purvesh,
> > >
> > > On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:
> > >
> > > > Hi Yana,
> > > >
> > > > On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva > > > > <yana@jitsi.org <mailto:yana@jitsi.org>> wrote:
> > > > Hi Purvesh,
> > > >
> > > > I know that you've started working on the spell check
> > > configuration form and wanted to share some thoughts on the
> > > subject here. We talked off-list about the existing outdated
> > > configuration form, could you please give us some more details,
> > > on what are the properties to configure? Do we set dictionaries
> > > there? What else?
> > > >
> > > >
> > > > The default dictionary is the EN_US one. Additional
> > > dictionaries are downloaded and installed on the fly. So that's
> > > something good.
> > >
> > > Sounds good.
> > >
> > > > I've attached a screenshot of the part I've been able to port.
> > >
> > > > The second screenshot shows the list of available dictionaries
> > > which are installed when selected ( the dictionary is downloaded
> > > ). I still have to get the dialog box to work.
> > >
> > > Thanks, it's much easier to discuss it when we know where we are!:slight_smile:
> > >
> > > It looks good as a start. I would just suggest that we don't put
> > > a whole combo box in the chat toolbar. Instead we can show just
> > > the country flag of the currently selected dictionary and when
> > > clicked show the menu as shown in the second screenshot. You can
> > > find this kind of component in the ChatTransportSelectorBox
> > > (corresponding to the selection of the protocol in the chat
> > > write area) or SmileysSelectorBox (corresponding to the smiley
> > > combo box in the chat toolbar), so you can inspire yourself from
> > > there.
> > >
> > > >
> > > > I was going through some mac chat clients (ichat and adium)
> > > and noticed that they do not have a general configuration form
> > > for spellchecking, but rather you're able to configure your
> > > spellcheck preferences for the current chat (you have a
> > > "Spelling and Grammar" item when right clicking in the chat
> > > write area). It's very useful, because you're able to change the
> > > language for a particular chat and have the spellchecking in
> > > english, french, etc. at the same time. Is this something we
> > > could do regarding our current spellcheck implementation?
> > > >
> > > >
> > > > Yes, this sounds like a plan. I was wondering where the spell
> > > check form would go. This sounds better.
> > > >
> > > > They also have the "Automatic by Language" check, which is
> > > very cool, although I'm not sure we can have this easily, so may
> > > be we could implement it in a next version. Could you please
> > > have a look at the code and tell us if it's feasible at this stage?
> > > >
> > > >
> > > > I'll take a look and let you know.
> > >
> > > Thanks!
> > >
> > > Cheers,
> > > Yana
> > >
> > > >
> > > >
> > > > Attached you'll find the sub-menu opened when you right click
> > > in the chat write area and then on "Spelling and Grammar" item.
> > > Also the window (I talked about above) opened when you choose
> > > "Show Spelling and Grammar".
> > > >
> > > > Cheers,
> > > > Yana
> > > >
> > > >
> > > >
> > > >
> > > > Thanks,
> > > > Purvesh
> > > >
> > > > <spellcheck.png><spellcheck-2.png>
> > >
> > >
> > >
> >
> > --
> > Emil Ivov, Ph.D. 67000 Strasbourg,
> > Project Lead France
> > Jitsi
> > emcho@jitsi.org PHONE: +33.1.77.62.43.30
> > http://jitsi.org FAX: +33.1.77.62.47.31
> >
> >
> > <patch.zip>
>
>
> <patch.zip>


#13

Hi Yana,

Here's the patch with all the changes. I haven't included the files (myspell
library) here.

I went through the dictionary URL issue. Apparently a lot of the new
dictionaries are hunspell formatted which won't be supported by our current
library. So we need the old myspell dictionaries. I'm trying to find the old
ones, we can replace the URLs once I manage to collect all the URLs.

Thanks!
Purvesh

SpellChecker.patch (95 KB)

···

On Thu, Jun 23, 2011 at 6:31 PM, Yana Stamcheva <yana@jitsi.org> wrote:

Hi Purvesh,

On Jun 23, 2011, at 3:32 PM, Purvesh Sahoo wrote:

> Hi Yana,
>
> Thanks for pointing out the bugs! I've added replies inline:)
>
> On Wed, Jun 22, 2011 at 3:15 PM, Yana Stamcheva <yana@jitsi.org> wrote:
> Hi Purvesh,
>
> It works now! Good work!!
>
> Here is a list of some small issues we should fix before enabling the
spellcheck:)
>
> - I get the following exception each time I click with the right mouse
button on an empty write area. It appears that we try to make spell check
even that there's no text.
>
> > [java] 12:08:04.449 SEVERE: util.UtilActivator.uncaughtException().88
An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and
message was: String index out of range: -1
> > [java] java.lang.StringIndexOutOfBoundsException: String index out
of range: -1
> > [java] at java.lang.String.substring(String.java:1931)
> > [java] at
net.java.sip.communicator.plugin.spellcheck.Word.getWord(Word.java:55)
> > [java] at
net.java.sip.communicator.plugin.spellcheck.ChatAttachments$2.getMenuElements(ChatAttachments.java:104)
> > [java] at
net.java.sip.communicator.impl.gui.main.chat.ChatWritePanel.mouseClicked(ChatWritePanel.java:626)
> > [java] at
java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
> > [java] at
java.awt.Component.processMouseEvent(Component.java:6377)
> >
>
> - Could you please rename the right button menu item "SpellCheck" to
"Show Spelling and Grammar" and the corresponding window to "Spelling and
Grammar".
>
>
> Fixed! :slight_smile:
>
> - The "Show Spelling and Grammar" item in the right click menu should
appear even if we're not over a text ( click on the empty space of the write
area ).
>
>
> Ok. But what do you we show in the Spelling and Grammar window? The first
misspelled word selected and the corresponding suggestions? What do we show,
in case there are no misspelled words?

Yes, we show the first misspelled word and nothing if no errors were found.

If the user opens the Spelling and Grammar window and leaves it open, they
could continue typing the message and the window will be updated with the
new misspelled word if any.

>
> - In the "Spelling ang Grammar" window, the "Find next" button doesn't
work (it also prints "false" on the terminal). When clicked, the next wrong
word should be shown in the text field on the left. When we're at the end of
the sentence it should go back to the first word. Also, please remove the
debug print:)
>
>
> Woops! Debug print removed and fixed! Actually, I perceived this
differently. The current implementation was to fetch the suggestions for a
word which the user might *type* into the textbox. But what you said makes
more sense. I've modified it!

>
> - In the "Spelling ang Grammar" window, when you double click on one of
the suggestions it should do "Replace".
>
>
> I had planned this, but it slipped from my mind. Thanks for reminding.
I'll add this :slight_smile:
>
> - When we choose a language that is not found we get the attached error
window. There are some missing strings that should be added to the
resources.properties file. And the link shown in the window, points to the
Damian's home page. Could you please explain us the process of downloading
new dictionaries? We should make it quite easy for the user to do that.
>
>
> Oh yeah. I must have missed those while porting the old code. I've added
those strings now. The dictionaries sources are listed in
resources/spellcheck/parameters.xml Damian had hosted a few dictionaries on
his website and hence his website link was shown in the error message, when
those dictionaries were not found there. The sources are listed here:
http://wiki.services.openoffice.org/wiki/Dictionaries We could update the
URLs to the latest location. :slight_smile:

Yes please, do so:)

Thanks!
Yana

>
> Thanks,
> Purvesh
>
> Otherwise I haven't yet looked at the code, but I'll try to review it
while we're working on the above issues.
>
> Cheers,
> Yana
>
>
>
>
> On Jun 21, 2011, at 5:58 PM, Purvesh Sahoo wrote:
>
> > Hi Yana,
> >
> > Woops! Sorry for that. Had a messed up workspace here. I have attached
a new patch. I've also applied the formatter you mentioned.
> >
> > Thanks,
> > Purvesh
> >
> > On Mon, Jun 20, 2011 at 7:53 PM, Yana Stamcheva <yana@jitsi.org> > wrote:
> > Hi Purvesh,
> >
> > I've just tried your patch and it doesn't work for me. It doesn't
compile and give me the following error:
> >
> > >
/Users/yanastamcheva/Documents/workspace/jitsinew/src/net/java/sip/communicator/plugin/spellcheck/SpellCheckActivator.java:48:
cannot find symbol
> > > [javac] symbol : class SpellCheckerConfigForm
> > > [javac] location: class
net.java.sip.communicator.plugin.spellcheck.SpellCheckActivator
> > > [javac] SpellCheckerConfigForm checkerManager =
> > >
> >
> > It seems that you're using the SpellCheckerConfigForm, which doesn't
exist in the patch.
> >
> > Otherwise, could you please format the code, so that it respects the
project code convention (
http://www.jitsi.org/index.php/Documentation/CodeConvention), use spaces
instead of tabs and respect the 80 column? I see that you're using eclipse,
so you can use the preconfigured formatter that you'll find on the same
page.
> >
> > Cheers,
> > Yana
> >
> > On Jun 13, 2011, at 2:44 PM, Purvesh Sahoo wrote:
> >
> > > Hi guys,
> > >
> > > Here's a patch with the library I was talking about earlier.
> > >
> > > Thanks,
> > > Purvesh
> > >
> > > On Thu, Jun 9, 2011 at 6:05 PM, Emil Ivov <emcho@jitsi.org> wrote:
> > > Great news!
> > >
> > > Thanks for the update Purvesh! Looking forward to trying it out!
> > >
> > > Emil
> > >
> > > На 09.06.11 09:10, Purvesh Sahoo написа:
> > > > Hi guys,
> > > >
> > > > Yana asked me to a take a look at Spark, since they had spellcheck
too.
> > > > Apparently, they use the same library we use, i.e jmyspell. I tried
it
> > > > out and the suggestions were fine there. I had contacted the
jmyspell
> > > > dev and he confirmed that there had been changes to the lib since
the
> > > > version we use. I tested the latest beta2 libs and the suggestions
are
> > > > indeed better!
> > > >
> > > > I think we can stick to jmyspell for now .
> > > >
> > > > Thanks,
> > > > Purvesh
> > > >
> > > > On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com > > > > > <mailto:jimpu2@gmail.com>> wrote:
> > > >
> > > > Hi everyone,
> > > >
> > > > I've had some discussion with Yana off the list regarding an
issue
> > > > we were facing with spellcheck. We currently use JMySpell as
our
> > > > spellchecking library, which is a java implementation of
MySpell.
> > > > The library is pretty old, and works fine for certain cases,
but
> > > > the word suggestions returned for misspelled words make no
sense at
> > > > times :confused:
> > > > For example, the suggestions for "helo" was "he lo".. So I
looked
> > > > into this issue, and I shared my findings with Yana. I'm
attaching
> > > > the mail to the dev list too.
> > > >
> > > > I looked into the issue, and apparently the suggestions aren't
> > > > strong/relevant for words which are misspelled towards the end.
eg:
> > > > helo instead of hello i.e if we miss out the letter before the
last
> > > > letter.
> > > >
> > > > In any case, I went and searched about JMySpell again, and
> > > > apparently MySpell is pretty old. Even Oo has moved over to a
fork
> > > > of MySpell viz. Hunspell. (http://hunspell.sourceforge.net/).
I
> > > > guess even Mozilla uses hunspell as their spellchecker lib. I
looked
> > > > into hunspell and the good thing about it is, that it is
backward
> > > > compatible with myspell dictionaries. But there are no java
bindings
> > > > for hunspell, only jna/jni java bindings. :frowning: I've tried the
jna
> > > > bindings ( http://dren.dk/hunspell.html ), and the suggestions
are
> > > > indeed a tad better. But then there are a few downsides. The
jna
> > > > binaries given above includes a pre-compiled native library
which
> > > > does not support "adding" words to dictionaries. The only way
around
> > > > this would be to compile the latest hunspell distribution for
> > > > different platforms and include the libraries in the jar.
> > > >
> > > > However, the OmegaT project ( www.omegat.org
> > > > <http://www.omegat.org/> ) apparently supports hunspell as
well and
> > > > they have the latest complied libs. To test it, I used the
windows
> > > > dll
> > > > from
http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/ instead
> > > > of the dll provided in hunspell.jar above. I could then use the
add
> > > > function to add words to the dictionary. I have tested this..
and it
> > > > seemed to work fine. But I have not tested the libs available
there
> > > > for other platforms.
> > > >
> > > > What do you think?
> > > >
> > > >
> > > > Thanks,
> > > > Purvesh
> > > >
> > > > On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva < > yana@jitsi.org > > > > > <mailto:yana@jitsi.org>> wrote:
> > > >
> > > > Hi Purvesh,
> > > >
> > > > On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:
> > > >
> > > > > Hi Yana,
> > > > >
> > > > > On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva > > > > > <yana@jitsi.org <mailto:yana@jitsi.org>> wrote:
> > > > > Hi Purvesh,
> > > > >
> > > > > I know that you've started working on the spell check
> > > > configuration form and wanted to share some thoughts on the
> > > > subject here. We talked off-list about the existing
outdated
> > > > configuration form, could you please give us some more
details,
> > > > on what are the properties to configure? Do we set
dictionaries
> > > > there? What else?
> > > > >
> > > > >
> > > > > The default dictionary is the EN_US one. Additional
> > > > dictionaries are downloaded and installed on the fly. So
that's
> > > > something good.
> > > >
> > > > Sounds good.
> > > >
> > > > > I've attached a screenshot of the part I've been able to
port.
> > > >
> > > > > The second screenshot shows the list of available
dictionaries
> > > > which are installed when selected ( the dictionary is
downloaded
> > > > ). I still have to get the dialog box to work.
> > > >
> > > > Thanks, it's much easier to discuss it when we know where
we are!:slight_smile:
> > > >
> > > > It looks good as a start. I would just suggest that we
don't put
> > > > a whole combo box in the chat toolbar. Instead we can show
just
> > > > the country flag of the currently selected dictionary and
when
> > > > clicked show the menu as shown in the second screenshot.
You can
> > > > find this kind of component in the ChatTransportSelectorBox
> > > > (corresponding to the selection of the protocol in the chat
> > > > write area) or SmileysSelectorBox (corresponding to the
smiley
> > > > combo box in the chat toolbar), so you can inspire yourself
from
> > > > there.
> > > >
> > > > >
> > > > > I was going through some mac chat clients (ichat and
adium)
> > > > and noticed that they do not have a general configuration
form
> > > > for spellchecking, but rather you're able to configure your
> > > > spellcheck preferences for the current chat (you have a
> > > > "Spelling and Grammar" item when right clicking in the chat
> > > > write area). It's very useful, because you're able to
change the
> > > > language for a particular chat and have the spellchecking
in
> > > > english, french, etc. at the same time. Is this something
we
> > > > could do regarding our current spellcheck implementation?
> > > > >
> > > > >
> > > > > Yes, this sounds like a plan. I was wondering where the
spell
> > > > check form would go. This sounds better.
> > > > >
> > > > > They also have the "Automatic by Language" check, which
is
> > > > very cool, although I'm not sure we can have this easily,
so may
> > > > be we could implement it in a next version. Could you
please
> > > > have a look at the code and tell us if it's feasible at
this stage?
> > > > >
> > > > >
> > > > > I'll take a look and let you know.
> > > >
> > > > Thanks!
> > > >
> > > > Cheers,
> > > > Yana
> > > >
> > > > >
> > > > >
> > > > > Attached you'll find the sub-menu opened when you right
click
> > > > in the chat write area and then on "Spelling and Grammar"
item.
> > > > Also the window (I talked about above) opened when you
choose
> > > > "Show Spelling and Grammar".
> > > > >
> > > > > Cheers,
> > > > > Yana
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Purvesh
> > > > >
> > > > > <spellcheck.png><spellcheck-2.png>
> > > >
> > > >
> > > >
> > >
> > > --
> > > Emil Ivov, Ph.D. 67000 Strasbourg,
> > > Project Lead France
> > > Jitsi
> > > emcho@jitsi.org PHONE: +33.1.77.62.43.30
> > > http://jitsi.org FAX: +33.1.77.62.47.31
> > >
> > >
> > > <patch.zip>
> >
> >
> > <patch.zip>
>
>
>


#14

Hi Purvesh,

I've committed and ack-ed the patch. Very good work! Thanks!

I have updated the list of dictionaries and have added some code in order to add to the English default dictionary, also Spanish, French and German dictionary. I have also moved the dictionary download in a separate thread and added a "loading..." label near the dictionary that is currently loaded.

I think that we have some more things to do here. For example currently I'm not able to uninstall a dictionary. Also it would be useful if we find a dictionary in the list while typing (i.e. add a key listener) and move all installed dictionaries on the top of the list. WDYT?

Cheers,
Yana

···

On Jul 2, 2011, at 9:29 PM, Purvesh Sahoo wrote:

Hi Yana,

Here's the patch with all the changes. I haven't included the files (myspell library) here.

I went through the dictionary URL issue. Apparently a lot of the new dictionaries are hunspell formatted which won't be supported by our current library. So we need the old myspell dictionaries. I'm trying to find the old ones, we can replace the URLs once I manage to collect all the URLs.

Thanks!
Purvesh

On Thu, Jun 23, 2011 at 6:31 PM, Yana Stamcheva <yana@jitsi.org> wrote:
Hi Purvesh,

On Jun 23, 2011, at 3:32 PM, Purvesh Sahoo wrote:

> Hi Yana,
>
> Thanks for pointing out the bugs! I've added replies inline:)
>
> On Wed, Jun 22, 2011 at 3:15 PM, Yana Stamcheva <yana@jitsi.org> wrote:
> Hi Purvesh,
>
> It works now! Good work!!
>
> Here is a list of some small issues we should fix before enabling the spellcheck:)
>
> - I get the following exception each time I click with the right mouse button on an empty write area. It appears that we try to make spell check even that there's no text.
>
> > [java] 12:08:04.449 SEVERE: util.UtilActivator.uncaughtException().88 An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message was: String index out of range: -1
> > [java] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> > [java] at java.lang.String.substring(String.java:1931)
> > [java] at net.java.sip.communicator.plugin.spellcheck.Word.getWord(Word.java:55)
> > [java] at net.java.sip.communicator.plugin.spellcheck.ChatAttachments$2.getMenuElements(ChatAttachments.java:104)
> > [java] at net.java.sip.communicator.impl.gui.main.chat.ChatWritePanel.mouseClicked(ChatWritePanel.java:626)
> > [java] at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
> > [java] at java.awt.Component.processMouseEvent(Component.java:6377)
> >
>
> - Could you please rename the right button menu item "SpellCheck" to "Show Spelling and Grammar" and the corresponding window to "Spelling and Grammar".
>
>
> Fixed! :slight_smile:
>
> - The "Show Spelling and Grammar" item in the right click menu should appear even if we're not over a text ( click on the empty space of the write area ).
>
>
> Ok. But what do you we show in the Spelling and Grammar window? The first misspelled word selected and the corresponding suggestions? What do we show, in case there are no misspelled words?

Yes, we show the first misspelled word and nothing if no errors were found.

If the user opens the Spelling and Grammar window and leaves it open, they could continue typing the message and the window will be updated with the new misspelled word if any.

>
> - In the "Spelling ang Grammar" window, the "Find next" button doesn't work (it also prints "false" on the terminal). When clicked, the next wrong word should be shown in the text field on the left. When we're at the end of the sentence it should go back to the first word. Also, please remove the debug print:)
>
>
> Woops! Debug print removed and fixed! Actually, I perceived this differently. The current implementation was to fetch the suggestions for a word which the user might *type* into the textbox. But what you said makes more sense. I've modified it!

>
> - In the "Spelling ang Grammar" window, when you double click on one of the suggestions it should do "Replace".
>
>
> I had planned this, but it slipped from my mind. Thanks for reminding. I'll add this :slight_smile:
>
> - When we choose a language that is not found we get the attached error window. There are some missing strings that should be added to the resources.properties file. And the link shown in the window, points to the Damian's home page. Could you please explain us the process of downloading new dictionaries? We should make it quite easy for the user to do that.
>
>
> Oh yeah. I must have missed those while porting the old code. I've added those strings now. The dictionaries sources are listed in resources/spellcheck/parameters.xml Damian had hosted a few dictionaries on his website and hence his website link was shown in the error message, when those dictionaries were not found there. The sources are listed here: http://wiki.services.openoffice.org/wiki/Dictionaries We could update the URLs to the latest location. :slight_smile:

Yes please, do so:)

Thanks!
Yana

>
> Thanks,
> Purvesh
>
> Otherwise I haven't yet looked at the code, but I'll try to review it while we're working on the above issues.
>
> Cheers,
> Yana
>
>
>
>
> On Jun 21, 2011, at 5:58 PM, Purvesh Sahoo wrote:
>
> > Hi Yana,
> >
> > Woops! Sorry for that. Had a messed up workspace here. I have attached a new patch. I've also applied the formatter you mentioned.
> >
> > Thanks,
> > Purvesh
> >
> > On Mon, Jun 20, 2011 at 7:53 PM, Yana Stamcheva <yana@jitsi.org> wrote:
> > Hi Purvesh,
> >
> > I've just tried your patch and it doesn't work for me. It doesn't compile and give me the following error:
> >
> > > /Users/yanastamcheva/Documents/workspace/jitsinew/src/net/java/sip/communicator/plugin/spellcheck/SpellCheckActivator.java:48: cannot find symbol
> > > [javac] symbol : class SpellCheckerConfigForm
> > > [javac] location: class net.java.sip.communicator.plugin.spellcheck.SpellCheckActivator
> > > [javac] SpellCheckerConfigForm checkerManager =
> > >
> >
> > It seems that you're using the SpellCheckerConfigForm, which doesn't exist in the patch.
> >
> > Otherwise, could you please format the code, so that it respects the project code convention (http://www.jitsi.org/index.php/Documentation/CodeConvention), use spaces instead of tabs and respect the 80 column? I see that you're using eclipse, so you can use the preconfigured formatter that you'll find on the same page.
> >
> > Cheers,
> > Yana
> >
> > On Jun 13, 2011, at 2:44 PM, Purvesh Sahoo wrote:
> >
> > > Hi guys,
> > >
> > > Here's a patch with the library I was talking about earlier.
> > >
> > > Thanks,
> > > Purvesh
> > >
> > > On Thu, Jun 9, 2011 at 6:05 PM, Emil Ivov <emcho@jitsi.org> wrote:
> > > Great news!
> > >
> > > Thanks for the update Purvesh! Looking forward to trying it out!
> > >
> > > Emil
> > >
> > > На 09.06.11 09:10, Purvesh Sahoo написа:
> > > > Hi guys,
> > > >
> > > > Yana asked me to a take a look at Spark, since they had spellcheck too.
> > > > Apparently, they use the same library we use, i.e jmyspell. I tried it
> > > > out and the suggestions were fine there. I had contacted the jmyspell
> > > > dev and he confirmed that there had been changes to the lib since the
> > > > version we use. I tested the latest beta2 libs and the suggestions are
> > > > indeed better!
> > > >
> > > > I think we can stick to jmyspell for now .
> > > >
> > > > Thanks,
> > > > Purvesh
> > > >
> > > > On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com > > > > > <mailto:jimpu2@gmail.com>> wrote:
> > > >
> > > > Hi everyone,
> > > >
> > > > I've had some discussion with Yana off the list regarding an issue
> > > > we were facing with spellcheck. We currently use JMySpell as our
> > > > spellchecking library, which is a java implementation of MySpell.
> > > > The library is pretty old, and works fine for certain cases, but
> > > > the word suggestions returned for misspelled words make no sense at
> > > > times :confused:
> > > > For example, the suggestions for "helo" was "he lo".. So I looked
> > > > into this issue, and I shared my findings with Yana. I'm attaching
> > > > the mail to the dev list too.
> > > >
> > > > I looked into the issue, and apparently the suggestions aren't
> > > > strong/relevant for words which are misspelled towards the end. eg:
> > > > helo instead of hello i.e if we miss out the letter before the last
> > > > letter.
> > > >
> > > > In any case, I went and searched about JMySpell again, and
> > > > apparently MySpell is pretty old. Even Oo has moved over to a fork
> > > > of MySpell viz. Hunspell. (http://hunspell.sourceforge.net/). I
> > > > guess even Mozilla uses hunspell as their spellchecker lib. I looked
> > > > into hunspell and the good thing about it is, that it is backward
> > > > compatible with myspell dictionaries. But there are no java bindings
> > > > for hunspell, only jna/jni java bindings. :frowning: I've tried the jna
> > > > bindings ( http://dren.dk/hunspell.html ), and the suggestions are
> > > > indeed a tad better. But then there are a few downsides. The jna
> > > > binaries given above includes a pre-compiled native library which
> > > > does not support "adding" words to dictionaries. The only way around
> > > > this would be to compile the latest hunspell distribution for
> > > > different platforms and include the libraries in the jar.
> > > >
> > > > However, the OmegaT project ( www.omegat.org
> > > > <http://www.omegat.org/> ) apparently supports hunspell as well and
> > > > they have the latest complied libs. To test it, I used the windows
> > > > dll
> > > > from http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/ instead
> > > > of the dll provided in hunspell.jar above. I could then use the add
> > > > function to add words to the dictionary. I have tested this.. and it
> > > > seemed to work fine. But I have not tested the libs available there
> > > > for other platforms.
> > > >
> > > > What do you think?
> > > >
> > > >
> > > > Thanks,
> > > > Purvesh
> > > >
> > > > On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva <yana@jitsi.org > > > > > <mailto:yana@jitsi.org>> wrote:
> > > >
> > > > Hi Purvesh,
> > > >
> > > > On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:
> > > >
> > > > > Hi Yana,
> > > > >
> > > > > On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva > > > > > <yana@jitsi.org <mailto:yana@jitsi.org>> wrote:
> > > > > Hi Purvesh,
> > > > >
> > > > > I know that you've started working on the spell check
> > > > configuration form and wanted to share some thoughts on the
> > > > subject here. We talked off-list about the existing outdated
> > > > configuration form, could you please give us some more details,
> > > > on what are the properties to configure? Do we set dictionaries
> > > > there? What else?
> > > > >
> > > > >
> > > > > The default dictionary is the EN_US one. Additional
> > > > dictionaries are downloaded and installed on the fly. So that's
> > > > something good.
> > > >
> > > > Sounds good.
> > > >
> > > > > I've attached a screenshot of the part I've been able to port.
> > > >
> > > > > The second screenshot shows the list of available dictionaries
> > > > which are installed when selected ( the dictionary is downloaded
> > > > ). I still have to get the dialog box to work.
> > > >
> > > > Thanks, it's much easier to discuss it when we know where we are!:slight_smile:
> > > >
> > > > It looks good as a start. I would just suggest that we don't put
> > > > a whole combo box in the chat toolbar. Instead we can show just
> > > > the country flag of the currently selected dictionary and when
> > > > clicked show the menu as shown in the second screenshot. You can
> > > > find this kind of component in the ChatTransportSelectorBox
> > > > (corresponding to the selection of the protocol in the chat
> > > > write area) or SmileysSelectorBox (corresponding to the smiley
> > > > combo box in the chat toolbar), so you can inspire yourself from
> > > > there.
> > > >
> > > > >
> > > > > I was going through some mac chat clients (ichat and adium)
> > > > and noticed that they do not have a general configuration form
> > > > for spellchecking, but rather you're able to configure your
> > > > spellcheck preferences for the current chat (you have a
> > > > "Spelling and Grammar" item when right clicking in the chat
> > > > write area). It's very useful, because you're able to change the
> > > > language for a particular chat and have the spellchecking in
> > > > english, french, etc. at the same time. Is this something we
> > > > could do regarding our current spellcheck implementation?
> > > > >
> > > > >
> > > > > Yes, this sounds like a plan. I was wondering where the spell
> > > > check form would go. This sounds better.
> > > > >
> > > > > They also have the "Automatic by Language" check, which is
> > > > very cool, although I'm not sure we can have this easily, so may
> > > > be we could implement it in a next version. Could you please
> > > > have a look at the code and tell us if it's feasible at this stage?
> > > > >
> > > > >
> > > > > I'll take a look and let you know.
> > > >
> > > > Thanks!
> > > >
> > > > Cheers,
> > > > Yana
> > > >
> > > > >
> > > > >
> > > > > Attached you'll find the sub-menu opened when you right click
> > > > in the chat write area and then on "Spelling and Grammar" item.
> > > > Also the window (I talked about above) opened when you choose
> > > > "Show Spelling and Grammar".
> > > > >
> > > > > Cheers,
> > > > > Yana
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Purvesh
> > > > >
> > > > > <spellcheck.png><spellcheck-2.png>
> > > >
> > > >
> > > >
> > >
> > > --
> > > Emil Ivov, Ph.D. 67000 Strasbourg,
> > > Project Lead France
> > > Jitsi
> > > emcho@jitsi.org PHONE: +33.1.77.62.43.30
> > > http://jitsi.org FAX: +33.1.77.62.47.31
> > >
> > >
> > > <patch.zip>
> >
> >
> > <patch.zip>
>
>
>

<SpellChecker.patch>


#15

Hi Yana,

Thank you for the fixes! It looks great now. (more inline)

Hi Purvesh,

I've committed and ack-ed the patch. Very good work! Thanks!

I have updated the list of dictionaries and have added some code in order
to add to the English default dictionary, also Spanish, French and German
dictionary. I have also moved the dictionary download in a separate thread
and added a "loading..." label near the dictionary that is currently loaded.

I think that we have some more things to do here. For example currently I'm
not able to uninstall a dictionary. Also it would be useful if we find a
dictionary in the list while typing (i.e. add a key listener) and move all
installed dictionaries on the top of the list. WDYT?

Yes I think this is required. I've made the above changes. Attaching a patch
for that.

Thanks,
Purvesh

checker.patch (11.9 KB)

···

On Thu, Jul 28, 2011 at 3:30 AM, Yana Stamcheva <yana@jitsi.org> wrote:

Cheers,
Yana

On Jul 2, 2011, at 9:29 PM, Purvesh Sahoo wrote:

> Hi Yana,
>
> Here's the patch with all the changes. I haven't included the files
(myspell library) here.
>
> I went through the dictionary URL issue. Apparently a lot of the new
dictionaries are hunspell formatted which won't be supported by our current
library. So we need the old myspell dictionaries. I'm trying to find the old
ones, we can replace the URLs once I manage to collect all the URLs.
>
> Thanks!
> Purvesh
>
> On Thu, Jun 23, 2011 at 6:31 PM, Yana Stamcheva <yana@jitsi.org> wrote:
> Hi Purvesh,
>
> On Jun 23, 2011, at 3:32 PM, Purvesh Sahoo wrote:
>
> > Hi Yana,
> >
> > Thanks for pointing out the bugs! I've added replies inline:)
> >
> > On Wed, Jun 22, 2011 at 3:15 PM, Yana Stamcheva <yana@jitsi.org> > wrote:
> > Hi Purvesh,
> >
> > It works now! Good work!!
> >
> > Here is a list of some small issues we should fix before enabling the
spellcheck:)
> >
> > - I get the following exception each time I click with the right mouse
button on an empty write area. It appears that we try to make spell check
even that there's no text.
> >
> > > [java] 12:08:04.449 SEVERE:
util.UtilActivator.uncaughtException().88 An uncaught exception occurred in
thread=Thread[AWT-EventQueue-0,6,main] and message was: String index out of
range: -1
> > > [java] java.lang.StringIndexOutOfBoundsException: String index
out of range: -1
> > > [java] at java.lang.String.substring(String.java:1931)
> > > [java] at
net.java.sip.communicator.plugin.spellcheck.Word.getWord(Word.java:55)
> > > [java] at
net.java.sip.communicator.plugin.spellcheck.ChatAttachments$2.getMenuElements(ChatAttachments.java:104)
> > > [java] at
net.java.sip.communicator.impl.gui.main.chat.ChatWritePanel.mouseClicked(ChatWritePanel.java:626)
> > > [java] at
java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
> > > [java] at
java.awt.Component.processMouseEvent(Component.java:6377)
> > >
> >
> > - Could you please rename the right button menu item "SpellCheck" to
"Show Spelling and Grammar" and the corresponding window to "Spelling and
Grammar".
> >
> >
> > Fixed! :slight_smile:
> >
> > - The "Show Spelling and Grammar" item in the right click menu should
appear even if we're not over a text ( click on the empty space of the write
area ).
> >
> >
> > Ok. But what do you we show in the Spelling and Grammar window? The
first misspelled word selected and the corresponding suggestions? What do we
show, in case there are no misspelled words?
>
> Yes, we show the first misspelled word and nothing if no errors were
found.
>
> If the user opens the Spelling and Grammar window and leaves it open,
they could continue typing the message and the window will be updated with
the new misspelled word if any.
>
> >
> > - In the "Spelling ang Grammar" window, the "Find next" button doesn't
work (it also prints "false" on the terminal). When clicked, the next wrong
word should be shown in the text field on the left. When we're at the end of
the sentence it should go back to the first word. Also, please remove the
debug print:)
> >
> >
> > Woops! Debug print removed and fixed! Actually, I perceived this
differently. The current implementation was to fetch the suggestions for a
word which the user might *type* into the textbox. But what you said makes
more sense. I've modified it!
>
> >
> > - In the "Spelling ang Grammar" window, when you double click on one of
the suggestions it should do "Replace".
> >
> >
> > I had planned this, but it slipped from my mind. Thanks for reminding.
I'll add this :slight_smile:
> >
> > - When we choose a language that is not found we get the attached error
window. There are some missing strings that should be added to the
resources.properties file. And the link shown in the window, points to the
Damian's home page. Could you please explain us the process of downloading
new dictionaries? We should make it quite easy for the user to do that.
> >
> >
> > Oh yeah. I must have missed those while porting the old code. I've
added those strings now. The dictionaries sources are listed in
resources/spellcheck/parameters.xml Damian had hosted a few dictionaries on
his website and hence his website link was shown in the error message, when
those dictionaries were not found there. The sources are listed here:
http://wiki.services.openoffice.org/wiki/Dictionaries We could update the
URLs to the latest location. :slight_smile:
>
> Yes please, do so:)
>
> Thanks!
> Yana
>
> >
> > Thanks,
> > Purvesh
> >
> > Otherwise I haven't yet looked at the code, but I'll try to review it
while we're working on the above issues.
> >
> > Cheers,
> > Yana
> >
> >
> >
> >
> > On Jun 21, 2011, at 5:58 PM, Purvesh Sahoo wrote:
> >
> > > Hi Yana,
> > >
> > > Woops! Sorry for that. Had a messed up workspace here. I have
attached a new patch. I've also applied the formatter you mentioned.
> > >
> > > Thanks,
> > > Purvesh
> > >
> > > On Mon, Jun 20, 2011 at 7:53 PM, Yana Stamcheva <yana@jitsi.org> > wrote:
> > > Hi Purvesh,
> > >
> > > I've just tried your patch and it doesn't work for me. It doesn't
compile and give me the following error:
> > >
> > > >
/Users/yanastamcheva/Documents/workspace/jitsinew/src/net/java/sip/communicator/plugin/spellcheck/SpellCheckActivator.java:48:
cannot find symbol
> > > > [javac] symbol : class SpellCheckerConfigForm
> > > > [javac] location: class
net.java.sip.communicator.plugin.spellcheck.SpellCheckActivator
> > > > [javac] SpellCheckerConfigForm checkerManager =
> > > >
> > >
> > > It seems that you're using the SpellCheckerConfigForm, which doesn't
exist in the patch.
> > >
> > > Otherwise, could you please format the code, so that it respects the
project code convention (
http://www.jitsi.org/index.php/Documentation/CodeConvention), use spaces
instead of tabs and respect the 80 column? I see that you're using eclipse,
so you can use the preconfigured formatter that you'll find on the same
page.
> > >
> > > Cheers,
> > > Yana
> > >
> > > On Jun 13, 2011, at 2:44 PM, Purvesh Sahoo wrote:
> > >
> > > > Hi guys,
> > > >
> > > > Here's a patch with the library I was talking about earlier.
> > > >
> > > > Thanks,
> > > > Purvesh
> > > >
> > > > On Thu, Jun 9, 2011 at 6:05 PM, Emil Ivov <emcho@jitsi.org> wrote:
> > > > Great news!
> > > >
> > > > Thanks for the update Purvesh! Looking forward to trying it out!
> > > >
> > > > Emil
> > > >
> > > > На 09.06.11 09:10, Purvesh Sahoo написа:
> > > > > Hi guys,
> > > > >
> > > > > Yana asked me to a take a look at Spark, since they had
spellcheck too.
> > > > > Apparently, they use the same library we use, i.e jmyspell. I
tried it
> > > > > out and the suggestions were fine there. I had contacted the
jmyspell
> > > > > dev and he confirmed that there had been changes to the lib since
the
> > > > > version we use. I tested the latest beta2 libs and the
suggestions are
> > > > > indeed better!
> > > > >
> > > > > I think we can stick to jmyspell for now .
> > > > >
> > > > > Thanks,
> > > > > Purvesh
> > > > >
> > > > > On Mon, Jun 6, 2011 at 6:16 PM, Purvesh Sahoo <jimpu2@gmail.com > > > > > > <mailto:jimpu2@gmail.com>> wrote:
> > > > >
> > > > > Hi everyone,
> > > > >
> > > > > I've had some discussion with Yana off the list regarding an
issue
> > > > > we were facing with spellcheck. We currently use JMySpell as
our
> > > > > spellchecking library, which is a java implementation of
MySpell.
> > > > > The library is pretty old, and works fine for certain cases,
but
> > > > > the word suggestions returned for misspelled words make no
sense at
> > > > > times :confused:
> > > > > For example, the suggestions for "helo" was "he lo".. So I
looked
> > > > > into this issue, and I shared my findings with Yana. I'm
attaching
> > > > > the mail to the dev list too.
> > > > >
> > > > > I looked into the issue, and apparently the suggestions
aren't
> > > > > strong/relevant for words which are misspelled towards the
end. eg:
> > > > > helo instead of hello i.e if we miss out the letter before
the last
> > > > > letter.
> > > > >
> > > > > In any case, I went and searched about JMySpell again, and
> > > > > apparently MySpell is pretty old. Even Oo has moved over to a
fork
> > > > > of MySpell viz. Hunspell. (http://hunspell.sourceforge.net/).
I
> > > > > guess even Mozilla uses hunspell as their spellchecker lib. I
looked
> > > > > into hunspell and the good thing about it is, that it is
backward
> > > > > compatible with myspell dictionaries. But there are no java
bindings
> > > > > for hunspell, only jna/jni java bindings. :frowning: I've tried the
jna
> > > > > bindings ( http://dren.dk/hunspell.html ), and the
suggestions are
> > > > > indeed a tad better. But then there are a few downsides. The
jna
> > > > > binaries given above includes a pre-compiled native library
which
> > > > > does not support "adding" words to dictionaries. The only way
around
> > > > > this would be to compile the latest hunspell distribution for
> > > > > different platforms and include the libraries in the jar.
> > > > >
> > > > > However, the OmegaT project ( www.omegat.org
> > > > > <http://www.omegat.org/> ) apparently supports hunspell as
well and
> > > > > they have the latest complied libs. To test it, I used the
windows
> > > > > dll
> > > > > from
http://omegat.svn.sourceforge.net/viewvc/omegat/trunk/native/ instead
> > > > > of the dll provided in hunspell.jar above. I could then use
the add
> > > > > function to add words to the dictionary. I have tested this..
and it
> > > > > seemed to work fine. But I have not tested the libs available
there
> > > > > for other platforms.
> > > > >
> > > > > What do you think?
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Purvesh
> > > > >
> > > > > On Thu, May 12, 2011 at 4:29 PM, Yana Stamcheva < > yana@jitsi.org > > > > > > <mailto:yana@jitsi.org>> wrote:
> > > > >
> > > > > Hi Purvesh,
> > > > >
> > > > > On May 10, 2011, at 6:00 PM, Purvesh Sahoo wrote:
> > > > >
> > > > > > Hi Yana,
> > > > > >
> > > > > > On Tue, May 10, 2011 at 7:42 PM, Yana Stamcheva > > > > > > <yana@jitsi.org <mailto:yana@jitsi.org>> wrote:
> > > > > > Hi Purvesh,
> > > > > >
> > > > > > I know that you've started working on the spell check
> > > > > configuration form and wanted to share some thoughts on
the
> > > > > subject here. We talked off-list about the existing
outdated
> > > > > configuration form, could you please give us some more
details,
> > > > > on what are the properties to configure? Do we set
dictionaries
> > > > > there? What else?
> > > > > >
> > > > > >
> > > > > > The default dictionary is the EN_US one. Additional
> > > > > dictionaries are downloaded and installed on the fly. So
that's
> > > > > something good.
> > > > >
> > > > > Sounds good.
> > > > >
> > > > > > I've attached a screenshot of the part I've been able
to port.
> > > > >
> > > > > > The second screenshot shows the list of available
dictionaries
> > > > > which are installed when selected ( the dictionary is
downloaded
> > > > > ). I still have to get the dialog box to work.
> > > > >
> > > > > Thanks, it's much easier to discuss it when we know where
we are!:slight_smile:
> > > > >
> > > > > It looks good as a start. I would just suggest that we
don't put
> > > > > a whole combo box in the chat toolbar. Instead we can
show just
> > > > > the country flag of the currently selected dictionary and
when
> > > > > clicked show the menu as shown in the second screenshot.
You can
> > > > > find this kind of component in the
ChatTransportSelectorBox
> > > > > (corresponding to the selection of the protocol in the
chat
> > > > > write area) or SmileysSelectorBox (corresponding to the
smiley
> > > > > combo box in the chat toolbar), so you can inspire
yourself from
> > > > > there.
> > > > >
> > > > > >
> > > > > > I was going through some mac chat clients (ichat and
adium)
> > > > > and noticed that they do not have a general configuration
form
> > > > > for spellchecking, but rather you're able to configure
your
> > > > > spellcheck preferences for the current chat (you have a
> > > > > "Spelling and Grammar" item when right clicking in the
chat
> > > > > write area). It's very useful, because you're able to
change the
> > > > > language for a particular chat and have the spellchecking
in
> > > > > english, french, etc. at the same time. Is this something
we
> > > > > could do regarding our current spellcheck implementation?
> > > > > >
> > > > > >
> > > > > > Yes, this sounds like a plan. I was wondering where the
spell
> > > > > check form would go. This sounds better.
> > > > > >
> > > > > > They also have the "Automatic by Language" check, which
is
> > > > > very cool, although I'm not sure we can have this easily,
so may
> > > > > be we could implement it in a next version. Could you
please
> > > > > have a look at the code and tell us if it's feasible at
this stage?
> > > > > >
> > > > > >
> > > > > > I'll take a look and let you know.
> > > > >
> > > > > Thanks!
> > > > >
> > > > > Cheers,
> > > > > Yana
> > > > >
> > > > > >
> > > > > >
> > > > > > Attached you'll find the sub-menu opened when you right
click
> > > > > in the chat write area and then on "Spelling and Grammar"
item.
> > > > > Also the window (I talked about above) opened when you
choose
> > > > > "Show Spelling and Grammar".
> > > > > >
> > > > > > Cheers,
> > > > > > Yana
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks,
> > > > > > Purvesh
> > > > > >
> > > > > > <spellcheck.png><spellcheck-2.png>
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > Emil Ivov, Ph.D. 67000 Strasbourg,
> > > > Project Lead France
> > > > Jitsi
> > > > emcho@jitsi.org PHONE: +33.1.77.62.43.30
> > > > http://jitsi.org FAX: +33.1.77.62.47.31
> > > >
> > > >
> > > > <patch.zip>
> > >
> > >
> > > <patch.zip>
> >
> >
> >
>
>
> <SpellChecker.patch>