类 Intent::P atternMatchingModel

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”文件的流。

返回

指向模式匹配模型的共享指针。