You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Anthony Mckale (JIRA)" <ji...@apache.org> on 2012/10/17 14:28:03 UTC
[jira] [Created] (LUCENE-4487) SpellChecker :
SpellChecker.indexDictionary : Javadoc incorrect
Anthony Mckale created LUCENE-4487:
--------------------------------------
Summary: SpellChecker : SpellChecker.indexDictionary : Javadoc incorrect
Key: LUCENE-4487
URL: https://issues.apache.org/jira/browse/LUCENE-4487
Project: Lucene - Core
Issue Type: Improvement
Components: modules/spellchecker
Affects Versions: 3.6.1
Reporter: Anthony Mckale
Priority: Minor
example code in javadoc seems to be incorrect
code changes from LUCENE-3557
means the javadoc
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
is incorrect i think something like this is better maybe
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
I'd possibly add something about creating a spellIndexDirectory too, not clear
{code}
Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
would of sent a patch but not similar with how to get access to the apache git repo do a pull/push
cheers
Ant
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: [jira] [Commented] (LUCENE-4487) SpellChecker :
SpellChecker.indexDictionary : Javadoc incorrect
Posted by Erick Erickson <er...@gmail.com>.
Here's the page that tells you how to get the source:
http://wiki.apache.org/solr/HowToContribute
for Subversion, it's simple:
svn checkout http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x
or
svn checkout http://svn.apache.org/repos/asf/lucene/dev/trunk
then make your changes and at the top level (the one that contains both the
solr and lucene directories), just execute:
svn diff
git is also used, and the page above tells you how to get things from Git, but
I'm not as familiar with Git.
Best
Erick
On Wed, Oct 17, 2012 at 8:40 AM, Simon Willnauer (JIRA) <ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/LUCENE-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477818#comment-13477818 ]
>
> Simon Willnauer commented on LUCENE-4487:
> -----------------------------------------
>
> this makes lots of sense! can you upload a patch for this?
>
> simon
>
>> SpellChecker : SpellChecker.indexDictionary : Javadoc incorrect
>> ---------------------------------------------------------------
>>
>> Key: LUCENE-4487
>> URL: https://issues.apache.org/jira/browse/LUCENE-4487
>> Project: Lucene - Core
>> Issue Type: Improvement
>> Components: modules/spellchecker
>> Affects Versions: 3.6.1
>> Reporter: Anthony Mckale
>> Priority: Minor
>>
>> example code in javadoc seems to be incorrect
>> code changes from LUCENE-3557
>> means the javadoc
>> {code}
>> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
>> // To index a field of a user index:
>> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
>> // To index a file containing words:
>> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
>> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
>> {code}
>> is incorrect i think something like this is better maybe
>> {code}
>> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
>> // To index a field of a user index:
>> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
>> // To index a file containing words:
>> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
>> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
>> {code}
>> I'd possibly add something about creating a spellIndexDirectory too, not clear
>> {code}
>> Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
>> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
>> // To index a field of a user index:
>> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
>> // To index a file containing words:
>> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
>> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
>> {code}
>> would of sent a patch but not familiar with how to get access to the apache git repo todo a pull/push
>> cheers
>> Ant
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: [jira] [Commented] (LUCENE-4487) SpellChecker :
SpellChecker.indexDictionary : Javadoc incorrect
Posted by Erick Erickson <er...@gmail.com>.
Cool!
On Wed, Oct 17, 2012 at 9:44 AM, Anthony Mckale (JIRA) <ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/LUCENE-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477893#comment-13477893 ]
>
> Anthony Mckale commented on LUCENE-4487:
> ----------------------------------------
>
> was trying to check out http://svn.apache.org/repos/asf/lucene/dev/trunk but having some corporate firewall issues today, will have a some time tomorrow to chuck a patch over about lunchish time
>
> cheers
>
> Ant
>
>> SpellChecker : SpellChecker.indexDictionary : Javadoc incorrect
>> ---------------------------------------------------------------
>>
>> Key: LUCENE-4487
>> URL: https://issues.apache.org/jira/browse/LUCENE-4487
>> Project: Lucene - Core
>> Issue Type: Improvement
>> Components: modules/spellchecker
>> Affects Versions: 3.6.1
>> Reporter: Anthony Mckale
>> Priority: Minor
>>
>> example code in javadoc seems to be incorrect
>> code changes from LUCENE-3557
>> means the javadoc
>> {code}
>> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
>> // To index a field of a user index:
>> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
>> // To index a file containing words:
>> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
>> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
>> {code}
>> is incorrect i think something like this is better maybe
>> {code}
>> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
>> // To index a field of a user index:
>> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
>> // To index a file containing words:
>> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
>> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
>> {code}
>> I'd possibly add something about creating a spellIndexDirectory too, not clear
>> {code}
>> Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
>> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
>> // To index a field of a user index:
>> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
>> // To index a file containing words:
>> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
>> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
>> {code}
>> would of sent a patch but not familiar with how to get access to the apache git repo todo a pull/push
>> cheers
>> Ant
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4487) SpellChecker :
SpellChecker.indexDictionary : Javadoc incorrect
Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477818#comment-13477818 ]
Simon Willnauer commented on LUCENE-4487:
-----------------------------------------
this makes lots of sense! can you upload a patch for this?
simon
> SpellChecker : SpellChecker.indexDictionary : Javadoc incorrect
> ---------------------------------------------------------------
>
> Key: LUCENE-4487
> URL: https://issues.apache.org/jira/browse/LUCENE-4487
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spellchecker
> Affects Versions: 3.6.1
> Reporter: Anthony Mckale
> Priority: Minor
>
> example code in javadoc seems to be incorrect
> code changes from LUCENE-3557
> means the javadoc
> {code}
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> is incorrect i think something like this is better maybe
> {code}
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> I'd possibly add something about creating a spellIndexDirectory too, not clear
> {code}
> Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> would of sent a patch but not familiar with how to get access to the apache git repo todo a pull/push
> cheers
> Ant
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4487) SpellChecker :
SpellChecker.indexDictionary : Javadoc incorrect
Posted by "Anthony Mckale (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477893#comment-13477893 ]
Anthony Mckale commented on LUCENE-4487:
----------------------------------------
was trying to check out http://svn.apache.org/repos/asf/lucene/dev/trunk but having some corporate firewall issues today, will have a some time tomorrow to chuck a patch over about lunchish time
cheers
Ant
> SpellChecker : SpellChecker.indexDictionary : Javadoc incorrect
> ---------------------------------------------------------------
>
> Key: LUCENE-4487
> URL: https://issues.apache.org/jira/browse/LUCENE-4487
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spellchecker
> Affects Versions: 3.6.1
> Reporter: Anthony Mckale
> Priority: Minor
>
> example code in javadoc seems to be incorrect
> code changes from LUCENE-3557
> means the javadoc
> {code}
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> is incorrect i think something like this is better maybe
> {code}
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> I'd possibly add something about creating a spellIndexDirectory too, not clear
> {code}
> Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> would of sent a patch but not familiar with how to get access to the apache git repo todo a pull/push
> cheers
> Ant
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4487) SpellChecker :
SpellChecker.indexDictionary : Javadoc incorrect
Posted by "Anthony Mckale (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anthony Mckale updated LUCENE-4487:
-----------------------------------
Description:
example code in javadoc seems to be incorrect
code changes from LUCENE-3557
means the javadoc
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
is incorrect i think something like this is better maybe
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
I'd possibly add something about creating a spellIndexDirectory too, not clear
{code}
Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
would of sent a patch but not familiar with how to get access to the apache git repo todo a pull/push
cheers
Ant
was:
example code in javadoc seems to be incorrect
code changes from LUCENE-3557
means the javadoc
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
is incorrect i think something like this is better maybe
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
I'd possibly add something about creating a spellIndexDirectory too, not clear
{code}
Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
would of sent a patch but not familiar with how to get access to the apache git repo do a pull/push
cheers
Ant
> SpellChecker : SpellChecker.indexDictionary : Javadoc incorrect
> ---------------------------------------------------------------
>
> Key: LUCENE-4487
> URL: https://issues.apache.org/jira/browse/LUCENE-4487
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spellchecker
> Affects Versions: 3.6.1
> Reporter: Anthony Mckale
> Priority: Minor
>
> example code in javadoc seems to be incorrect
> code changes from LUCENE-3557
> means the javadoc
> {code}
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> is incorrect i think something like this is better maybe
> {code}
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> I'd possibly add something about creating a spellIndexDirectory too, not clear
> {code}
> Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> would of sent a patch but not familiar with how to get access to the apache git repo todo a pull/push
> cheers
> Ant
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4487) SpellChecker :
SpellChecker.indexDictionary : Javadoc incorrect
Posted by "Anthony Mckale (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anthony Mckale updated LUCENE-4487:
-----------------------------------
Description:
example code in javadoc seems to be incorrect
code changes from LUCENE-3557
means the javadoc
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
is incorrect i think something like this is better maybe
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
I'd possibly add something about creating a spellIndexDirectory too, not clear
{code}
Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
would of sent a patch but not familiar with how to get access to the apache git repo do a pull/push
cheers
Ant
was:
example code in javadoc seems to be incorrect
code changes from LUCENE-3557
means the javadoc
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
is incorrect i think something like this is better maybe
{code}
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
I'd possibly add something about creating a spellIndexDirectory too, not clear
{code}
Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
// To index a file containing words:
spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
{code}
would of sent a patch but not similar with how to get access to the apache git repo do a pull/push
cheers
Ant
> SpellChecker : SpellChecker.indexDictionary : Javadoc incorrect
> ---------------------------------------------------------------
>
> Key: LUCENE-4487
> URL: https://issues.apache.org/jira/browse/LUCENE-4487
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spellchecker
> Affects Versions: 3.6.1
> Reporter: Anthony Mckale
> Priority: Minor
>
> example code in javadoc seems to be incorrect
> code changes from LUCENE-3557
> means the javadoc
> {code}
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> is incorrect i think something like this is better maybe
> {code}
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> I'd possibly add something about creating a spellIndexDirectory too, not clear
> {code}
> Directory spellIndexDirectory = FSDirectory.open("/dev/tmp/SOME_WORKING_DIR");
> SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
> // To index a field of a user index:
> spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> // To index a file containing words:
> spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")), new IndexWriterConfig(Version.LUCENE_CURRENT, null), false);
> String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
> {code}
> would of sent a patch but not familiar with how to get access to the apache git repo do a pull/push
> cheers
> Ant
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org