Content Extractor FactoryParse Custom Entity Definitions Method
Parses a string containing custom entity definitions into a list of CustomEntityDefinition.
This list can them be passed to method LoadCustomEntityDefinitions(ListCustomEntityDefinition) as the argument.
Definition
Namespace: OpenDiscoverSDK
Assembly: OpenDiscoverSDK (in OpenDiscoverSDK.dll) Version: 2026.2.6.0 (2026.02.06)
A parsed list of CustomEntityDefinition
Assembly: OpenDiscoverSDK (in OpenDiscoverSDK.dll) Version: 2026.2.6.0 (2026.02.06)
C#
public static List<CustomEntityDefinition> ParseCustomEntityDefinitions(
string definitionStr
)Parameters
- definitionStr String
Return Value
ListCustomEntityDefinitionA parsed list of CustomEntityDefinition
Remarks
FORMAT of text file:
- lines starting with '#' are comments
- lines starting with '[CustomEntityDefinition]' are the start of a custom item definition
- the next non-comment line must have be of format:
Format of custom item definitions in this test file (a line beginning with a '#' is a comment and ignored):
[CustomEntityDefinition]
Name | Classification | RequireKeywordSequenceAtStartOfLine | ExtractType
keyword+sequence+1
keyword+sequence+2
...
keyword+sequence+N
Example:
[CustomEntityDefinition]
# Test #1: searches for "invoiced company name:" AND "invoiced co. name:" (not case sensitive) and returns the remaining text on the line
InvoicedCompany | InvoiceDocument | false | RemainingLine
invoiced+company+name+:
invoiced+co+.+name+:
invoiced+co+name+:
OR if ExtractType = RegularExpressionAfter, RegularExpressionBefore, or RegularExpressionBeforeAndAfter:
Name | Classification | KeywordSequence | RequireKeywordSequenceAtStartOfLine | ExtractType
RegularExpression
NumRegExSearchChars
A keyword sequence is terms and symbols separated by '+' (addition sign). There can be no space between terms, '+', and symbols
and a sequence cannot start or end with a '+'. A sequence must begin with a word term.