Spell Check Xtra
CLICK HERE TO
DOWNLOAD!
Created by Kevin Richard Fink
April 5th 2007
THIS XTRA IS PROVIDED AS IS, WITHOUT ANY IMPLIED WARRANTEE! FOLLOW INSTRUCTIONS
CAREFULLY AND USE AT YOUR OWN RISK!
This is a work in progress xtra, as such some features are not yet fully
operational. Here is the current status of each call:
Complete features: (stable)
FindAndReplace(word, lookFor, replaceWith) -- Replaces a part of a
string in a string with another string. Returns the result.
FindAndReplaceAll(word, lookFor, replaceWith) -- Replaces all parts of a
string in a string with another string. Returns the result.
Beta features: (unstable)
CheckWord(Word) -- Returns true if the word is spelled correctly
GetSuggestions(word) -- Returns a list of words closely matching
the specified word.
SPELL CHECK BENCHMARK AND CHALLENGE TO THE COMPETITORS
Can your Xtra beat my score? Prove it! Sign up and download the benchmark
application used for these results. Who needs claims like "Very Fast" or
"Lightning Fast", here is the performance you should expect on the given test
configuration. Contact me at kfink@nvisionstudio.com to add your results!
Test Configuration:
- Windows XP x64
- Intel Core 2 E6600 @ 2.4ghz (Dual Core - 2x 2.4ghz)
- 2gb Dual Channel (2x1gb) OCZ Platinum DDR2 PC6400
- Geforce 8800GTS 640mb
- Using 400,000 word database.
|
Word Count
|
Generate corrections for ALL words |
Check spelling for ALL words |
Time spent in loop
|
|
1,000 |
0.6667 seconds
|
0.1666 seconds
|
0.0000 seconds
|
|
5,000 |
3.6500 seconds
|
0.3500 seconds
|
0.2667 seconds
|
|
10,000 |
7.8000 seconds
|
1.2000 seconds
|
1.0833 seconds
|
|
50,000 |
61.5833 seconds
|
27.6167 seconds
|
26.2000 seconds
|
|
100,000 |
176.9667 seconds
|
108.6333 seconds
|
106.7500 seconds
|
* The times displayed are for the total time taken.
* This test uses RTF text members rather then fields to mimic real life
behaviour in applications that will actually use it. To find the actual time
taken by the xtra, subtract the time spent in loop.
INSTALLATION
Simply extract and copy "SpellCheckXtra.x32" to your xtra directory of your
Director Installation
HOW TO USE
-----------------------------------------------------------------------------
checkWord (Object me, String word)
DESCRIPTION:
Returns true if the word is spelled correctly, false if it is not.
USAGE:
object = new(xtra "SpellCheckXtra")
put object.checkWord("test")
-----------------------------------------------------------------------------
getSuggestions (Object me, String word)
DESCRIPTION:
Returns a list of strings closely matching the word specified
USAGE:
object = new(xtra "SpellCheckXtra")
if object.checkWord("testz") then
alert object.getSuggestions("testz")
end if
-----------------------------------------------------------------------------
findAndReplace (Object me, String word, String lookFor, String
replaceWith)
DESCRIPTION:
Replaces a string within a string with the specified string.
USAGE:
object = new(xtra "SpellCheckXtra")
alert output.findAndReplace("Testing", "tin", "lg")
outputs:
"Teslgg"
-----------------------------------------------------------------------------
findAndReplaceAll (Object me, String word, String lookFor, String
replaceWith)
DESCRIPTION:
Replaces a string within a string with the specified string.
USAGE:
object = new(xtra "SpellCheckXtra")
alert output.findAndReplace("Testingtin", "tin", "lg")
outputs:
"Teslgglg"
|