com.sebtools.SpamFilter

Component SpamFilter (Spam Filter)


hierarchy: WEB-INF.cftags.component
      com.sebtools.SpamFilter
properties:
methods: init, filter, getDbXml, getPoints, getRegEx, getRegExs, getWord, getWords, isSpam, loadUniversalData, loadWords, numRegExMatches, numWordMatches, removeRegEx, removeWord, saveRegEx, saveWord


init
public any init ( required any DataMgr, boolean getNewDefs="0" )

I instantiate and return this component.

Output: suppressed
Parameters:
   DataMgr: any, required, DataMgr
   getNewDefs: boolean, optional, getNewDefs

filter
public struct filter ( required struct data, numeric maxpoints="0" )

I run the filter on the given structure and return it.

Output: suppressed
Parameters:
   data: struct, required, data
   maxpoints: numeric, optional, maxpoints

getDbXml
public string getDbXml ( )

I return the XML for the tables needed for Spam Filter to work.

Output: suppressed

getPoints
public numeric getPoints ( required struct data )

I return the number of points in the given structure.

Output: suppressed
Parameters:
   data: struct, required, data

getRegEx
public query getRegEx ( required string RegExID )

I return the requested regex.

Output: suppressed
Parameters:
   RegExID: string, required, RegExID

getRegExs
public query getRegExs ( )

I return all of the regexs.

Output: suppressed

getWord
public query getWord ( required string WordID )

I return the requested word.

Output: suppressed
Parameters:
   WordID: string, required, WordID

getWords
public query getWords ( )

I return all of the words.

Output: suppressed

isSpam
public boolean isSpam ( required struct data, numeric maxpoints="0" )

I indicate whether the given structure is spam.

Output: suppressed
Parameters:
   data: struct, required, data
   maxpoints: numeric, optional, maxpoints

loadUniversalData
public void loadUniversalData ( )

I get external spam definitions.

Output: suppressed

loadWords
public void loadWords ( required string wordlist )

I load the given list of (carriage-return delimited) words to the spam words definitions.

Output: suppressed
Parameters:
   wordlist: string, required, wordlist

numRegExMatches
public numeric numRegExMatches ( string string, string regex )

I return the number of times the given regular expression is matched in the given string.

Output: suppressed
Parameters:
   string: string, optional, string
   regex: string, optional, regex

numWordMatches
public numeric numWordMatches ( string string, string word )

I return the number of times the given word is found in the given string.

Output: suppressed
Parameters:
   string: string, optional, string
   word: string, optional, word

removeRegEx
public void removeRegEx ( required string RegExID )

I delete the given RegEx.

Output: suppressed
Parameters:
   RegExID: string, required, RegExID

removeWord
public void removeWord ( required string WordID )

I delete the given Word.

Output: suppressed
Parameters:
   WordID: string, required, WordID

saveRegEx
public string saveRegEx ( string RegExID, string RegEx, string Label, string points )

I save a RegEx.

Output: suppressed
Parameters:
   RegExID: string, optional, RegExID
   RegEx: string, optional, RegEx
   Label: string, optional, Label
   points: string, optional, points

saveWord
public string saveWord ( string WordID, string Word, string points )

I save a Word.

Output: suppressed
Parameters:
   WordID: string, optional, WordID
   Word: string, optional, Word
   points: string, optional, points