Installation

ASPDidYouMean is installed by copying the downloaded directory "ASPDidYouMean" to the root of your website.

If you choose to install it to a different folder - you must use the SetInstallPath function to clarify the software's location.

Installing Dictionaries

The default dictionary is "English (Fast).dic". You can install additional language dictionaries such as French, Spanish, German, Dutch, Portuguese and many specialized English dictionaries.

The dictionaries have the file extension .dic. To install these dictionaries - first download them and place them in the "Dictionaries" directory within your DidYouMean Directory.

 

Hello World

Please refer to the file /ASPDidYouMean/sample.asp for a complete working example. Also see the live demo.

<!--#include virtual="/ASPDidYouMean/ASPDidYouMean.asp"-->

<%
SET dym = ASPSpellObjectProvider.create("ASPDIDYOUMEAN")
dym.AddDictionary("English (Fast)")
response.write dym.SuggestionString ("helllo world")
%>

 

Object Reference

Creating the ASPDidYouMean Object.

Include the file ASPDidYouMean/ASPDidYouMean.asp
then create an instance of the DidYouMean object.

<!--#include virtual="/ASPDidYouMean/ASPDidYouMean.asp"-->
<%

SET DidYouMean = ASPSpellObjectProvider.create("ASPDIDYOUMEAN") %>

 

Dictionaries

DidYouMean.AddDictionary(strDictionaryName)
Adds a .dic dictionary in the /ASPDidYouMean/Dictionaries folder to the DidYouMean vocabulary.

DidYouMean.ListDictionariesArray()
Returns an array of the names of all installed dictionary files.

DidYouMean.RemoveDictionary(strDictionaryName)

 

Adding Custom Words to the Spellchecker's Vocabulary

The easiest way to add custom words is to copy them into /ASPDidYouMean/Dictionarie/Custom.txt 1 word per line.

DidYouMean.AddVocabularyFile(strFileName)
Adds custom words from a text file. The file must be placed in the /ASPDidYouMean/Dictionaries folder. 1 word per line.

DidYouMean.AddVocabularyArray (arrayWords,id)
Adds custom words from a an array file. The id is used to identify and cache the words.

DidYouMean.ClearVocabularyArray (id)

Adds custom words added using the AddVocabularyFile function. The id is used to identify and remove the words from the cache.

DidYouMean.VocabularyArrayTimestamp (id)
Retrieves the time and date that AddVocabularyArray was used to add vocabulary. The id is used to identify and the cached words.

DidYouMean.SetBannedWords(arrayWords)
Sets an array of banned words that will never spellcheck true nor be returned as suggestions.

 

Suggestion Results


DidYouMean.SpellCheck(strQuery)
Is the phrase spelled correctly - according to the Did You Mean object's vocabulary. Returns true or false.

DidYouMean.SuggestionString(strQuery)
Returns a the most likely suggestion for a search query or word as a string.


DidYouMean.SuggestionsArray(strQuery)
Returns an array of spellchecking suggestions for the query. The maximum number of suggestions can be set using SetSugguestionsLimit.

DidYouMean.SafeQuery(strQuery)
Returns a string of only the correctly spelled words in the query.

 

Settings

DidYouMean.SetInstallPath(strPath)
Sets the ASPDidYouMean installation directory. The default value is "/ASPDidYouMean"


DidYouMean.SetLicenseKey(strKey)
Applies a purchased license key.

DidYouMean.SetSugguestionsLimit(intLimit)
Limits the number of suggestions returned by the SuggestionsArray function.