class Intent::PatternMatchingModel
: public Intent::LanguageUnderstandingModel
表示用于意向识别的模式匹配模型。
成员
意图
语法:public std::vector< PatternMatchingIntent > Intents;
此意向容器用于定义此模型将查找的所有意向。
实体
语法:public std::vector< PatternMatchingEntity > Entities;
此意向容器用于定义此模型将查找的所有意向。
GetModelId
语法:public inline virtual std::string GetModelId ( ) const;
返回此模型的 ID。
退货
一个表示此模型的 ID 的字符串。
FromModelId
语法:public inline static std::shared_ptr< PatternMatchingModel > FromModelId ( const std::string & modelId );
使用指定的模型 ID 创建模式匹配模型。
参数
-
modelId表示此模型的唯一 ID 的字符串。
退货
指向模式匹配模型的共享指针。
FromJSONFile
语法:public inline static std::shared_ptr< PatternMatchingModel > FromJSONFile ( const std::string & filepath );
使用指定的 .json 文件创建模式匹配模型。 这应遵循 MICROSOFT LUIS JSON 导出架构。
参数
-
filepath表示'.json'文件的路径的字符串。
退货
指向模式匹配模型的共享指针。
FromJSONFileStream
语法:public inline static std::shared_ptr< PatternMatchingModel > FromJSONFileStream ( std::istream & iStream );
使用指向 LUIS json 格式的 .json 文件的指定 istream 创建 PatternMatchingModel。 这假定流已打开,并且有权读取。
参数
-
iStream表示“.json”文件的流。
退货
指向模式匹配模型的共享指针。