Help Needed in Spellchecking of a keyword

S

Srikanth

Hi,

We need to check the spelling of a word which is actually a Domain
name. For example we have to check the word " onlinetradeing ".
When checked with the spell checkers we are getting the words which are
unrelated such as on, obliterating, incinerating, intruding etc. But
exactly what we want was " online trading ". So we would like to
have the word to be split into phrases and check the spelling too. The
normal spell checkers are just checking the words in the dictionary but
not splitting the word into phrases.

Can any one help me...?

Regards
L.Srikanth.
 
A

Anno Siegel

Srikanth said:
Hi,

We need to check the spelling of a word which is actually a Domain
name. For example we have to check the word " onlinetradeing ".
When checked with the spell checkers we are getting the words which are
unrelated such as on, obliterating, incinerating, intruding etc. But
exactly what we want was " online trading ". So we would like to
have the word to be split into phrases and check the spelling too. The
normal spell checkers are just checking the words in the dictionary but
not splitting the word into phrases.

If the spell checker doesn't do that, there is little Perl can do
about it.

You could split each "word" in parts in all possible ways and let
your spell checker have a go at them:

$_ = 'onlinetrading';

for my $break ( 1 .. length() - 1 ) {
pos = $break;
my ( $first, $last) = split /\G/;
print "$_ = $first + $last\n" if check( $first) && check( $last);
}

but that would presumably take quite some time. It still wouldn't
recognize "onlinetradingcenter", which must be broken into three parts.

I doubt there is a practical way to do that unless you find or write
a spelling checker that supports it directly.

Anno
 
D

Dr.Ruud

Srikanth schreef:
We need to check the spelling of a word which is actually a Domain
name. For example we have to check the word " onlinetradeing ".
When checked with the spell checkers we are getting the words which
are unrelated such as on, obliterating, incinerating, intruding etc.
But exactly what we want was " online trading ". So we would like to
have the word to be split into phrases and check the spelling too. The
normal spell checkers are just checking the words in the dictionary
but not splitting the word into phrases.

Can any one help me...?

Please don't multi-post. (
Use an English wordlist, chop off the longest matching word from the
end, and repeat that.
If that doesn't end with an empty string, do the same from the start,
repeat that, and report both the failing and the remaining string.
ftp://ftp.ox.ac.uk/pub/wordlists/
With some backtracing, this can of course be easily improved on, if
that's worth it.

A speedy alternative is to use a hyphenation algorithm first, and step
(back) by syllable (in stead of letter).
http://en.wikipedia.org/wiki/Hyphenation_algorithm
http://search.cpan.org/perldoc?TeX::Hyphen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top