Link Search Menu Expand Document

ClassifierAddRule Method

Adds a rule for the detection of a document by its content

Namespace:ByteScout.DocumentParser
Assembly: ByteScout.DocumentParser (in ByteScout.DocumentParser.dll) Version: 6.4.1.617-master
Syntax
public void AddRule(
	string className,
	ClassifierRuleLogic logic,
	ICollection<string> keyPhrases,
	bool caseSensitive = true
)

Parameters

className
Type: SystemString
Class name that will be returned as result if a document matches the rule.
logic
Type: ByteScout.DocumentParserClassifierRuleLogic
Logic of rule. Use AND if all key phrases must exist in the document. Use OR if at least one key phrase must exist in the document.
keyPhrases
Type: System.Collections.GenericICollectionString
List of key phrases or regular expressions.
caseSensitive (Optional)
Type: SystemBoolean
Case sensitivity. Default is True (case sensitive).
Remarks
Regular expressions are expected in ECMA format (as used in JavaScript): the expression must be embraced with slashes '/ /' with optional regex options in the end, for example: "/ab+c/i".
See Also

Reference