You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Luca Rondanini <lu...@gmail.com> on 2011/10/22 02:49:55 UTC

Language Identifier with Lucene?

Hi all,

I usually use Nutch for this but, just for fun, I tried to create a language
identifier based on Lucene only.

I had a really small set of "training data": 10 files (roughly 2M each) for
10 languages. I indexed those files using an NGram analyzer.

I have to say that I was not expecting much...but the results seem amazing!

What do you think of this approach?

Beside the good results, that could easily be false positives due to the
small training set, I wonder if maybe I am misunderstanding Lucene's VSM!

I'll try to increase the "training" data and see what happen changing NGram
size too! I'll keep you posted, meanwhile let me know what you think.

Thanks,
Luca

Re: Language Identifier with Lucene?

Posted by Luca Rondanini <lu...@gmail.com>.
Mead,

it just depends on how many languages you enter in the system!

Collecting the data is not a huge problem: I'm using news websites in 19
languages! The quality of the content is usually high and they "talk" a
lot!

Watch out that the real problem is the encoding: you want to be sure
everything is using the same!

hope this will help,
Luca








On Mon, Oct 24, 2011 at 3:29 AM, Mead Lai <la...@gmail.com> wrote:

> Luca,
>
> I would like to know: how much language, your system could identify?
> In my view, this difficult part in your system is: how to collect so many
> languages/character in the world for *one person*...
>
> Regards,
> Mead
>
>
> On Sun, Oct 23, 2011 at 1:27 AM, Petite Abeille <petite_abeille@me.com
> >wrote:
>
> >
> > On Oct 22, 2011, at 2:49 AM, Luca Rondanini wrote:
> >
> > > I usually use Nutch for this but, just for fun, I tried to create a
> > language
> > > identifier based on Lucene only.
> >
> > Talking of which:
> >
> > Google's Compact Language Detector
> >
> >
> http://blog.mikemccandless.com/2011/10/language-detection-with-googles-compact.html
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>

Re: Language Identifier with Lucene?

Posted by Mead Lai <la...@gmail.com>.
Luca,

I would like to know: how much language, your system could identify?
In my view, this difficult part in your system is: how to collect so many
languages/character in the world for *one person*...

Regards,
Mead


On Sun, Oct 23, 2011 at 1:27 AM, Petite Abeille <pe...@me.com>wrote:

>
> On Oct 22, 2011, at 2:49 AM, Luca Rondanini wrote:
>
> > I usually use Nutch for this but, just for fun, I tried to create a
> language
> > identifier based on Lucene only.
>
> Talking of which:
>
> Google's Compact Language Detector
>
> http://blog.mikemccandless.com/2011/10/language-detection-with-googles-compact.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Language Identifier with Lucene?

Posted by Petite Abeille <pe...@me.com>.
On Oct 22, 2011, at 2:49 AM, Luca Rondanini wrote:

> I usually use Nutch for this but, just for fun, I tried to create a language
> identifier based on Lucene only.

Talking of which:

Google's Compact Language Detector
http://blog.mikemccandless.com/2011/10/language-detection-with-googles-compact.html


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org