Crosstales.BWF.Filter.IFilter Interface Reference

Interface for all filters. More...

Inheritance diagram for Crosstales.BWF.Filter.IFilter:
Crosstales.BWF.Filter.BaseFilter Crosstales.BWF.Filter.BadWordFilter Crosstales.BWF.Filter.CapitalizationFilter Crosstales.BWF.Filter.DomainFilter Crosstales.BWF.Filter.PunctuationFilter

Public Member Functions

bool Contains (string text, params string[] sourceNames)
 Searches for bad words in a text. More...
 
System.Collections.Generic.List< string > GetAll (string text, params string[] sourceNames)
 Searches for bad words in a text. More...
 
string ReplaceAll (string text, bool markOnly=false, string prefix="", string postfix="", params string[] sourceNames)
 Searches and replaces all bad words in a text. More...
 
string Mark (string text, bool replace=false, string prefix="<b><color=red>", string postfix="</color></b>", params string[] sourceNames)
 Marks the text with a prefix and postfix. More...
 
string Unmark (string text, string prefix="<b><color=red>", string postfix="</color></b>")
 Unmarks the text with a prefix and postfix. More...
 

Properties

System.Collections.Generic.List< Crosstales.BWF.Data.SourceSources [get]
 All sources of the current filter. More...
 
bool isReady [get]
 Checks the readiness status of the current filter. More...
 

Detailed Description

Interface for all filters.

Member Function Documentation

◆ Contains()

bool Crosstales.BWF.Filter.IFilter.Contains ( string  text,
params string[]  sourceNames 
)

Searches for bad words in a text.

Parameters
textText to check
sourceNamesRelevant sources (e.g. "english", optional)
Returns
True if a match was found

Implemented in Crosstales.BWF.Filter.BadWordFilter, Crosstales.BWF.Filter.DomainFilter, Crosstales.BWF.Filter.BaseFilter, Crosstales.BWF.Filter.CapitalizationFilter, and Crosstales.BWF.Filter.PunctuationFilter.

◆ GetAll()

System.Collections.Generic.List<string> Crosstales.BWF.Filter.IFilter.GetAll ( string  text,
params string[]  sourceNames 
)

Searches for bad words in a text.

Parameters
textText to check
sourceNamesRelevant sources (e.g. "english", optional)
Returns
List with all the matches

Implemented in Crosstales.BWF.Filter.BadWordFilter, Crosstales.BWF.Filter.DomainFilter, Crosstales.BWF.Filter.CapitalizationFilter, Crosstales.BWF.Filter.PunctuationFilter, and Crosstales.BWF.Filter.BaseFilter.

◆ Mark()

string Crosstales.BWF.Filter.IFilter.Mark ( string  text,
bool  replace = false,
string  prefix = "<b><color=red>",
string  postfix = "</color></b>",
params string[]  sourceNames 
)

Marks the text with a prefix and postfix.

Parameters
textText containing bad words
replaceReplace the bad words (default: false, optional)
prefixPrefix for every found bad word (default: bold and red, optional)
postfixPostfix for every found bad word (default: bold and red, optional)
sourceNamesRelevant sources (e.g. "english", optional)
Returns
Text with marked domains

Implemented in Crosstales.BWF.Filter.BaseFilter.

◆ ReplaceAll()

string Crosstales.BWF.Filter.IFilter.ReplaceAll ( string  text,
bool  markOnly = false,
string  prefix = "",
string  postfix = "",
params string[]  sourceNames 
)

Searches and replaces all bad words in a text.

Parameters
textText to check
markOnlyOnly mark the words (default: false, optional)
prefixPrefix for every found bad word (optional)
postfixPostfix for every found bad word (optional)
sourceNamesRelevant sources (e.g. "english", optional)
Returns
Clean text

Implemented in Crosstales.BWF.Filter.BadWordFilter, Crosstales.BWF.Filter.DomainFilter, Crosstales.BWF.Filter.PunctuationFilter, Crosstales.BWF.Filter.CapitalizationFilter, and Crosstales.BWF.Filter.BaseFilter.

◆ Unmark()

string Crosstales.BWF.Filter.IFilter.Unmark ( string  text,
string  prefix = "<b><color=red>",
string  postfix = "</color></b>" 
)

Unmarks the text with a prefix and postfix.

Parameters
textText with marked bad words
prefixPrefix for every found bad word (optional)
postfixPostfix for every found bad word (optional)
Returns
Text with marked bad words

Implemented in Crosstales.BWF.Filter.BaseFilter.

Property Documentation

◆ isReady

bool Crosstales.BWF.Filter.IFilter.isReady
get

Checks the readiness status of the current filter.

Returns
True if the filter is ready.

◆ Sources

System.Collections.Generic.List<Crosstales.BWF.Data.Source> Crosstales.BWF.Filter.IFilter.Sources
get

All sources of the current filter.

Returns
List with all sources for the current filter

The documentation for this interface was generated from the following file:
  • C:/Users/slaub/Unity/assets/BWFPro/BWFPro/Assets/Plugins/crosstales/BadWordFilter/Scripts/Filter/IFilter.cs