A semantic model that contains display data for semantic values and provides feature functions for deriving missing data.
More...
#include <SemanticFeatureModel.hpp>
|
static constexpr auto | SPEAK = u"speak" |
|
A semantic model that contains display data for semantic values and provides feature functions for deriving missing data.
Definition at line 22 of file SemanticFeatureModel.hpp.
◆ SemanticFeatureModel() [1/2]
◆ SemanticFeatureModel() [2/2]
Creates a SemanticFeatureModel for a given locale with a mapping of display data used for constructing things like a SemanticConcept.
- Parameters
-
locale | The locale. |
semanticValueMap | The mapping of a semantic value to display data. |
◆ ~SemanticFeatureModel()
inflection::dialog::SemanticFeatureModel::~SemanticFeatureModel |
( |
| ) |
|
|
override |
◆ getDefaultDisplayFunction()
const DefaultDisplayFunction * inflection::dialog::SemanticFeatureModel::getDefaultDisplayFunction |
( |
| ) |
const |
◆ getDefaultFeatureFunction()
const DefaultFeatureFunction * inflection::dialog::SemanticFeatureModel::getDefaultFeatureFunction |
( |
const SemanticFeature & |
feature | ) |
const |
Returns the registered feature function for the requested semantic feature.
- Parameters
-
feature | The feature to request. |
- Returns
- Returns null if no feature function exists.
◆ getDisplayData()
◆ getFeature()
const SemanticFeature * inflection::dialog::SemanticFeatureModel::getFeature |
( |
::std::u16string_view |
name | ) |
const |
Return the semantic feature by the name.
- Parameters
-
name | The name of the semantic feature. |
◆ getFeatureAlias()
If a feature name is aliasable, return the associated semantic feature and its value. If a semantic feature can be more than one name, the value will have the canonical name. This can happen if the semantic feature has been deprecated, or has more than one known name for the value.
- Parameters
-
name | The name of the semantic feature. |
- Returns
- The semantic feature will be null if no alias was found.
◆ getKnownSemanticValues()
◆ getLocale()
const util::ULocale & inflection::dialog::SemanticFeatureModel::getLocale |
( |
| ) |
const |
◆ putDefaultFeatureFunction()
void inflection::dialog::SemanticFeatureModel::putDefaultFeatureFunction |
( |
const SemanticFeature & |
feature, |
|
|
DefaultFeatureFunction * |
function |
|
) |
| |
Register a default feature function for a semantic feature.
- Parameters
-
feature | The feature to register the function for. |
function | The feature function to call for the semantic feature. This SemanticFeatureModel will adopt ownership of this function, and it will be deleted when this SemanticFeatureModel is deleted. |
◆ putDefaultFeatureFunctionByName()
void inflection::dialog::SemanticFeatureModel::putDefaultFeatureFunctionByName |
( |
::std::u16string_view |
feature, |
|
|
DefaultFeatureFunction * |
function |
|
) |
| |
This function works the same way as putDefaultFeatureFunction, but an exception is thrown if the feature is unknown.
- Parameters
-
◆ setDefaultDisplayFunction()
void inflection::dialog::SemanticFeatureModel::setDefaultDisplayFunction |
( |
DefaultDisplayFunction * |
defaultDisplayFunction | ) |
|
◆ SPEAK
constexpr auto inflection::dialog::SemanticFeatureModel::SPEAK = u"speak" |
|
staticconstexpr |
The documentation for this class was generated from the following file: