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 Mário André <ma...@infonet.com.br> on 2009/12/23 18:04:20 UTC

spellchecker

Hello friends,

I’m new here and in the lucene Project. I’m trying use the "spellchecker"
according to the exemple below:

 

// To index a file containing words:

  spellchecker.indexDictionary(new PlainTextDictionary(new
File("myfile.txt")));

  String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);

 

But my question is: How Can I write (layout) the file (myfile.txt) ?

 

---------------------------------------------------------------------

Mário André

Instituto Federal de Educação, Ciência e Tecnologia de Sergipe - IFS

Mestrando em MCC - Universidade Federal de Alagoas - UFAL

http://www.marioandre.com.br/

Skype: mario-fa

----------------------------------------------------------------------------
----------

 


RES: spellchecker

Posted by Mário André <ma...@infonet.com.br>.
Thanks!

---------------------------------------------------------------------
Mário André
Instituto Federal de Educação, Ciência e Tecnologia de Sergipe - IFS
Mestrando em MCC - Universidade Federal de Alagoas - UFAL
http://www.marioandre.com.br/
Skype: mario-fa
--------------------------------------------------------------------------------------


-----Mensagem original-----
De: Simon Willnauer [mailto:simon.willnauer@googlemail.com] 
Enviada em: quarta-feira, 23 de dezembro de 2009 15:39
Para: java-user@lucene.apache.org
Assunto: Re: spellchecker

Hi mario,

PlainTextDictionary expects a text file with one word per line like:

hello
world
foo
bar

simon

2009/12/23 Mário André <ma...@infonet.com.br>:
> Hello friends,
>
> I’m new here and in the lucene Project. I’m trying use the "spellchecker"
> according to the exemple below:
>
>
>
> // To index a file containing words:
>
>  spellchecker.indexDictionary(new PlainTextDictionary(new
> File("myfile.txt")));
>
>  String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
>
>
>
> But my question is: How Can I write (layout) the file (myfile.txt) ?
>
>
>
> ---------------------------------------------------------------------
>
> Mário André
>
> Instituto Federal de Educação, Ciência e Tecnologia de Sergipe - IFS
>
> Mestrando em MCC - Universidade Federal de Alagoas - UFAL
>
> http://www.marioandre.com.br/
>
> Skype: mario-fa
>
> ----------------------------------------------------------------------------
> ----------
>
>
>
>

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



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


Re: spellchecker

Posted by Simon Willnauer <si...@googlemail.com>.
Hi mario,

PlainTextDictionary expects a text file with one word per line like:

hello
world
foo
bar

simon

2009/12/23 Mário André <ma...@infonet.com.br>:
> Hello friends,
>
> I’m new here and in the lucene Project. I’m trying use the "spellchecker"
> according to the exemple below:
>
>
>
> // To index a file containing words:
>
>  spellchecker.indexDictionary(new PlainTextDictionary(new
> File("myfile.txt")));
>
>  String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
>
>
>
> But my question is: How Can I write (layout) the file (myfile.txt) ?
>
>
>
> ---------------------------------------------------------------------
>
> Mário André
>
> Instituto Federal de Educação, Ciência e Tecnologia de Sergipe - IFS
>
> Mestrando em MCC - Universidade Federal de Alagoas - UFAL
>
> http://www.marioandre.com.br/
>
> Skype: mario-fa
>
> ----------------------------------------------------------------------------
> ----------
>
>
>
>

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