Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / spellcheck assist function

Author
Message
bitoart
20
Years of Service
User Offline
Joined: 20th Nov 2003
Location: California
Posted: 12th Nov 2006 07:43 Edited at: 12th Nov 2006 07:46
I've created a function I plan to use with a simple spell check I'm adding to a text adventure.
It will certainly work with and predefined dictionary.
word1$ = the source (misspelled) word
word2$ = the proposed correct spelling

The returned value gap is the number of changes/edits need to alter word1$ to word2$

simply loop through all recognized words in program's "dictionary". The closest match (unless it's way off) may included in a message like: "Do you mean, ";statement before the unknown word; closest valid word$; "?"



Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 13th Nov 2006 00:12
Hey, nice idea. Pulled it off in a smart way too. Good work.

Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Nov 2006 18:48
hey thats nice.

Login to post a reply

Server time is: 2024-03-28 11:34:01
Your offset time is: 2024-03-28 11:34:01