Skip to content

wrong split of "value" in SpellCorrection.getWords() #4

Description

@GoogleCodeExporter
What steps will reproduce the problem?
--------------------------------------
1.
   SpellResponse spellResponse = checker.check("dontknow")
2.
   for ( SpellCorrection sc : spellResponse.getCorrections() )
      System.out.println( sc.getWords()[0] );
3.

What is the expected output? What do you see instead?
-----------------------------------------------------
I guess SpellCorrection.getWords() should split the alternatives returned by 
the google's api.

The expected output then should be "don't know" for getWords()[0] but is 
"don't".

Please provide any additional information below.
------------------------------------------------
Looking at the output xml it seems that the alternatives are separated by a 
tab, 

so you have to replace 

   "value.split(\\s)"

by

   "value.split(\\t)"

in SpellCorrection.getWords().


Original issue reported on code.google.com by matthaeu...@gmail.com on 5 Sep 2012 at 1:16

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions