合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
# 3.4 示例 </br> ## 3.4.1 用法示例 ~~~ //请联系灵聚科技工作人员获取专属产品的key与授权码值 static const std::string KEY = " xxx"; static const std::string AUTHCODE = "xxx"; static std::string city; static std::string lat; static std::string lng; static const int TIMEOUT_SECONDS = 10*1000; boost::shared_ptr<SemanticUnderstand> suInstance = emanticUnderstand::getInstance(); suInstance->init(KEY, AUTHCODE, city, lat, lng, TIMEOUT_SECONDS); SemanticResult result=suInstance->getAnswer("你叫什么名字"); ~~~ </br> ## 3.4.2 用法例子项目 * 位于:LingjuSdk/(window或linux)平台/LingjuSdk/SemanticExample。具体详见[项目打开方式](项目打开方式.md) * 请把从开发平台申请到的key和authcode替换LingjuSdk/SemanticExample/com/lingju/init/ExampleTest.cpp文件中相应的值, 如图下所示: ![](https://box.kancloud.cn/23a6fcf9cbed868d59711016b53338f6_489x166.png)