Class: EnumNamedEntity

EnumNamedEntity(settings)

Class for the Enumerated Named Entity.

Constructor

new EnumNamedEntity(settings)

Constructor of the class.
Parameters:
Name Type Description
settings Object Settings for the instance.
Source:

Methods

addText(optionName, srcLanguages, srcTexts)

Add texts to the given languages of an option.
Parameters:
Name Type Description
optionName String Name of the option.
srcLanguages Array.<String> Language or languages for adding the texts.
srcTexts Array.<String> Text or texts to be added.
Source:

extract(utterance, language, similar, wordPositions, threshold) → {Array.<Object>}

Given an utterance and language, extract the different occurances of this named entity in the utterance.
Parameters:
Name Type Description
utterance String Source utterance to extract information.
language String Locale of the language.
similar Object Instance of SimilarSearch.
wordPositions Array.<Object> Optional array of word positions.
threshold number Threshold of accuracy.
Source:
Returns:
Edges found.
Type
Array.<Object>

getOption(language, optionName, create) → {Object}

Get or create an option inside a locale
Parameters:
Name Type Default Description
language string Locale of the language.
optionName string Name of the option.
create boolean true Flag indicating if should create if not exists.
Source:
Returns:
Option object.
Type
Object

removeText(optionName, srcLanguages, srcTexts)

Remove texts for the given languages of the option.
Parameters:
Name Type Description
optionName String Name of the option.
srcLanguages Array.<String> Languages affected.
srcTexts Array.<String> Texts to be removed.
Source: