This is a migrated thread and some comments may be shown as answers.

Getting the nearest correct suggestion for mispelled string

5 Answers 50 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 2
Anthony asked on 29 Mar 2011, 08:30 AM
Hello Telerik team,

I would like to ask if I can make this following scenario:

1. I have a textbox that's accepting sets of string (a Search box)
2. I have a button (Search button) that will be linked to the RadSpell. (Can this be done? If possible, please give me an assistance)
3. After clicking the Search box, the Radspell window should not be opened. (Is this possible, if yes, kindly teach me how)
4. Instead, the Radspell will get the nearest correct suggestion and display it on a page...

Example is attached for better understanding of my inquiry...

Thank You and Regards,

Anthony

 

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Mar 2011, 11:36 AM
Hello Anthony,

Could you please try the attached project here which demonstrates how to get the suggestions list using the SpellChecker class and the GetSuggestions method? This could be helpful for implementing your custom scenario.


Kind regards,
Rumen
the Telerik team
0
Anthony
Top achievements
Rank 2
answered on 01 Apr 2011, 09:51 AM
Hello Sir Rumen,

That really help a lot, but its an implementation from a dictionary file. That will give me an idea how to implement search offline. However, I badly needed the spelling functionality provided by Google, I know I have seen that somewhere on the demo.

Can you give me an example of that like you did on the dictionary implementation?  And also, I would like to add the functionality that will check all multiple words.

For Example:

"aple pie" will get the suggested result "apple pie" or "bnana shke" will get the result of "banana shake"

--  the sample project you attached from the post gives only result for the first word..

Regards,

Anthony
0
Rumen
Telerik team
answered on 05 Apr 2011, 01:39 PM
Hi Anthony,

You should note that RadSpell does not offer the requested functionality out-of-the box and we do not support it.
You can get the first suggested word from the GetSuggestions method using

SpellChecker spellChecker = new SpellChecker(Server.MapPath("~/App_Data/RadSpell/"));
        spellChecker.DictionaryLanguage = "en-us";
        string[] suggestions = spellChecker.GetSuggestions(TextBox1.Text);
        Label1.Text = suggestions[0];


 In addition the Google Spellcheck provider could not be used with the SpellChecker class of RadSpell and you should choose between using the EditDistance or Phonetic providers if you want to use the spellchecker on the server without its UI interface. 

Kind regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Anthony
Top achievements
Rank 2
answered on 06 Apr 2011, 03:03 AM
Hello Sir Rumen, 


"In addition the Google Spellcheck provider could not be used with the SpellChecker class of RadSpell and you should choose between using the EditDistance or Phonetic providers if you want to use the spellchecker on the server without its UI interface. " - quoted from Rumen.

What do you mean sir?, I'm sorry because I am a newbie when it comes to Telerik controls.

Anyway, I would like to see how could I pass a value to the Google Spellcheck provider without me seeing the popup box checking if the strings are in a correct spelling. I have tried the implementation of the link you provided me for the Google Spellcheck provider, and I really want to get it automated getting the first index of suggestion from the result given by the provider.

Say I have text input "bnana shke", this would loop through the Google Spellcheck provider and combine the suggestions "banana" and "shake" to make it into a complete string of "banana shake"

I hope you would help me on this.

Thank you and regards,

Anthony
0
Rumen
Telerik team
answered on 06 Apr 2011, 12:57 PM
Hello Anthony,

I wanted to explain that exactly this scenario cannot be implemented with the Google Spellcheck provider, e.g. the Google provider cannot be used without showing the spellchecker dialog. RadSpell does not also offer the ability to spell check more than one strings at the same time.

I am afraid that RadSpell is not suitable for your specific scenario and you will need to search for another spellchecker that covers your custom requirements.

Kind regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Spell
Asked by
Anthony
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Anthony
Top achievements
Rank 2
Share this question
or