BogaNet 1.4.0
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
BogaNet.BWF.Filter.IBadWordFilter Interface Reference

Interface for bad word filters. More...

Inheritance diagram for BogaNet.BWF.Filter.IBadWordFilter:
BogaNet.BWF.Filter.ISourceFilter BogaNet.BWF.Filter.IFilter BogaNet.BWF.Filter.BadWordFilter

Public Member Functions

void Load (bool isLTR, Dictionary< string, string[]> dataDict)
 Load sources from a given Dictionary.
 
bool LoadFiles (bool isLTR, params Tuple< string, string >[] files)
 Load source files (CSV) from a given path.
 
Task< bool > LoadFilesAsync (bool isLTR, params Tuple< string, string >[] files)
 Load source files (CSV) from a given path asynchronously.
 
bool LoadFilesFromUrl (bool isLTR, params Tuple< string, string >[] urls)
 Load source files (CSV) from given URLs.
 
Task< bool > LoadFilesFromUrlAsync (bool isLTR, params Tuple< string, string >[] urls)
 Load source files (CSV) from given URLs asynchronously.
 
void Add (bool isLTR, string srcName, params string[] words)
 Adds a source with words.
 
- Public Member Functions inherited from BogaNet.BWF.Filter.ISourceFilter
delegate void FilesLoaded (params Tuple< string, string >[] files)
 Delegate for the load status of the files.
 
bool Remove (string srcName)
 Removes a source and assigned data.
 
bool ContainsSource (string srcName)
 Checks if a given source name exists in the filter.
 
void Clear ()
 Clears all sources.
 
- Public Member Functions inherited from BogaNet.BWF.Filter.IFilter
bool Contains (string text, params string[]? sourceNames)
 Searches for bad words in a text.
 
List< string > GetAll (string text, params string[]? sourceNames)
 Searches for bad words in a text.
 
string ReplaceAll (string text, params string[]? sourceNames)
 Searches and replaces all bad words in a text.
 

Properties

char[] ReplaceCharacters [get, set]
 Replace characters for bad words.
 
ReplaceMode Mode [get, set]
 Replace mode operations on the input string.
 
bool RemoveSpaces [get, set]
 Remove unnecessary spaces between letters in the input string.
 
int MaxTextLength [get, set]
 Maximal text length for the space detection.
 
string RemoveCharacters [get, set]
 Remove unnecessary characters from the input string.
 
bool SimpleCheck [get, set]
 Use simple detection algorithm (e.g. for Chinese, Japanese, Korean, Thai etc.).
 
- Properties inherited from BogaNet.BWF.Filter.ISourceFilter
int Count [get]
 Current count of sources from the filter.
 
List< string > SourceNames [get]
 All source names of the current filter.
 
bool IsLoaded [get]
 Is the filter loaded?
 

Additional Inherited Members

- Events inherited from BogaNet.BWF.Filter.ISourceFilter
FilesLoaded OnFilesLoaded
 Event triggered whenever the files are loaded.
 

Detailed Description

Interface for bad word filters.

Member Function Documentation

◆ Add()

void BogaNet.BWF.Filter.IBadWordFilter.Add ( bool isLTR,
string srcName,
params string[] words )

Adds a source with words.

Parameters
isLTRIs source written left-to-right?
srcNameSource name
wordsWords for the source
Exceptions
ArgumentNullException

◆ Load()

void BogaNet.BWF.Filter.IBadWordFilter.Load ( bool isLTR,
Dictionary< string, string[]> dataDict )

Load sources from a given Dictionary.

Parameters
isLTRIs source written left-to-right?
dataDictDictionary to load

returns>True if the operation was successful

Exceptions
Exception

Implemented in BogaNet.BWF.Filter.BadWordFilter.

◆ LoadFiles()

bool BogaNet.BWF.Filter.IBadWordFilter.LoadFiles ( bool isLTR,
params Tuple< string, string >[] files )

Load source files (CSV) from a given path.

Parameters
isLTRIs source written left-to-right?
filesFiles to load (Item1 = source name, Item2 = file)

returns>True if the operation was successful

Exceptions
Exception

Implemented in BogaNet.BWF.Filter.BadWordFilter.

◆ LoadFilesAsync()

Task< bool > BogaNet.BWF.Filter.IBadWordFilter.LoadFilesAsync ( bool isLTR,
params Tuple< string, string >[] files )

Load source files (CSV) from a given path asynchronously.

Parameters
isLTRIs source written left-to-right?
filesFiles to load (Item1 = source name, Item2 = file)

returns>True if the operation was successful

Exceptions
Exception

Implemented in BogaNet.BWF.Filter.BadWordFilter.

◆ LoadFilesFromUrl()

bool BogaNet.BWF.Filter.IBadWordFilter.LoadFilesFromUrl ( bool isLTR,
params Tuple< string, string >[] urls )

Load source files (CSV) from given URLs.

Parameters
isLTRIs source written left-to-right?
urlsURLs of files to load (Item1 = source name, Item2 = file)

returns>True if the operation was successful

Exceptions
Exception

Implemented in BogaNet.BWF.Filter.BadWordFilter.

◆ LoadFilesFromUrlAsync()

Task< bool > BogaNet.BWF.Filter.IBadWordFilter.LoadFilesFromUrlAsync ( bool isLTR,
params Tuple< string, string >[] urls )

Load source files (CSV) from given URLs asynchronously.

Parameters
isLTRIs source written left-to-right?
urlsURLs of files to load (Item1 = source name, Item2 = file)

returns>True if the operation was successful

Exceptions
Exception

Implemented in BogaNet.BWF.Filter.BadWordFilter.

Property Documentation

◆ MaxTextLength

int BogaNet.BWF.Filter.IBadWordFilter.MaxTextLength
getset

Maximal text length for the space detection.

Implemented in BogaNet.BWF.Filter.BadWordFilter.

◆ Mode

ReplaceMode BogaNet.BWF.Filter.IBadWordFilter.Mode
getset

Replace mode operations on the input string.

Implemented in BogaNet.BWF.Filter.BadWordFilter.

◆ RemoveCharacters

string BogaNet.BWF.Filter.IBadWordFilter.RemoveCharacters
getset

Remove unnecessary characters from the input string.

Implemented in BogaNet.BWF.Filter.BadWordFilter.

◆ RemoveSpaces

bool BogaNet.BWF.Filter.IBadWordFilter.RemoveSpaces
getset

Remove unnecessary spaces between letters in the input string.

Implemented in BogaNet.BWF.Filter.BadWordFilter.

◆ ReplaceCharacters

char [] BogaNet.BWF.Filter.IBadWordFilter.ReplaceCharacters
getset

Replace characters for bad words.

Implemented in BogaNet.BWF.Filter.BadWordFilter.

◆ SimpleCheck

bool BogaNet.BWF.Filter.IBadWordFilter.SimpleCheck
getset

Use simple detection algorithm (e.g. for Chinese, Japanese, Korean, Thai etc.).

Implemented in BogaNet.BWF.Filter.BadWordFilter.


The documentation for this interface was generated from the following file: