public class TAipNlp extends BaseClient
app_id, app_key, config| 限定符和类型 | 方法和说明 |
|---|---|
String |
nlpImageTranslate(byte[] image,
String session_id,
String scene,
String source,
String target)
图片翻译
识别图片中的文字,并进行翻译
|
String |
nlpImageTranslate(String filePath,
String session_id,
String scene,
String source,
String target)
图片翻译
识别图片中的文字,并进行翻译
|
String |
nlpSpeechTranslate(int format,
int seq,
int end,
String session_id,
byte[] speech_chunk,
String source,
String target)
语音翻译
识别出音频中的文字,并进行翻译
|
String |
nlpSpeechTranslate(int format,
int seq,
int end,
String session_id,
String filePath,
String source,
String target)
语音翻译
识别出音频中的文字,并进行翻译
|
String |
nlpTextchat(String session,
String question)
基础闲聊
|
String |
nlpTextDetect(String text,
int force)
语种识别 (不需要备选语言candidate_langs参数)
识别给出文本的语种
|
String |
nlpTextDetect(String text,
String candidate_langs,
int force)
语种识别
识别给出文本的语种
|
String |
nlpTextpolar(String text)
情感分析识别
对文本进行情感分析,快速判断情感倾向(正面或负面)
|
String |
nlpTextTrans(int type,
String text)
文本翻译(AI Lab)
对文本进行翻译,支持多种语言之间互译
文本翻译接口提供自动翻译能力,可以帮您快速完成一段文本的翻译,支持中、英、德、法、日、韩、西、粤语种
|
String |
nlpTextTranslate(String text,
String source,
String target)
文本翻译(翻译君)
对文本进行翻译,支持多种语言之间互译
文本翻译接口提供自动翻译能力,可以帮您快速完成一段文本的翻译,支持多种语言之间的互译。
|
String |
nlpWordcom(String text)
意图成分识别
对文本进行意图识别,快速找出意图及上下文成分
|
String |
nlpWordner(String text)
专有名词识别
对文本进行专有名词的分词识别,找出文本中的专有名词
|
String |
nlpWordpos(String text)
词性标注
对文本进行分词,同时为每个分词标注正确的词性
|
String |
nlpWordseg(String text)
分词
对文本进行智能分词识别,支持基础词与混排词粒度
|
String |
nlpWordsyn(String text)
同义词识别
识别文本中存在同义词的分词,并返回相应的同义词
|
requestServer, setConnectionTimeoutInMillis, setHttpProxy, setSocketProxy, setSocketTimeoutInMillispublic String nlpWordseg(String text) throws Exception
text - 待分析文本Exceptionpublic String nlpWordpos(String text) throws Exception
text - 待分析文本Exceptionpublic String nlpWordner(String text) throws Exception
text - 待分析文本Exceptionpublic String nlpWordsyn(String text) throws Exception
text - 待分析文本Exceptionpublic String nlpWordcom(String text) throws Exception
text - 待分析文本Exceptionpublic String nlpTextpolar(String text) throws Exception
text - 待分析文本Exceptionpublic String nlpTextchat(String session, String question) throws Exception
session - 会话标识(应用内唯一)question - 用户输入的聊天内容Exceptionpublic String nlpTextTrans(int type, String text) throws Exception
type - 翻译类型text - 待翻译文本Exceptionpublic String nlpTextTranslate(String text, String source, String target) throws Exception
text - 待翻译文本source - 源语言缩写target - 目标语言缩写Exceptionpublic String nlpImageTranslate(byte[] image, String session_id, String scene, String source, String target) throws Exception
image - 二进制图片数据session_id - 一次请求IDscene - 识别类型(word-单词识别,doc-文档识别)source - 源语言缩写target - 目标语言缩写Exceptionpublic String nlpImageTranslate(String filePath, String session_id, String scene, String source, String target) throws Exception
filePath - 图片本地路径session_id - 一次请求IDscene - 识别类型(word-单词识别,doc-文档识别)source - 源语言缩写target - 目标语言缩写Exceptionpublic String nlpTextDetect(String text, String candidate_langs, int force) throws Exception
text - 待识别文本candidate_langs - 备选语言缩写force - 是否强制从候选语言中选择(只对二选一有效)Exceptionpublic String nlpTextDetect(String text, int force) throws Exception
text - 待识别文本force - 是否强制从候选语言中选择(只对二选一有效)Exceptionpublic String nlpSpeechTranslate(int format, int seq, int end, String session_id, byte[] speech_chunk, String source, String target) throws Exception
format - 语音压缩格式编码seq - 语音分片所在语音流的偏移量end - 是否结束分片标识session_id - 语音唯一标识(同一应用内)speech_chunk - 待识别语音分片二进制数据source - 源语言缩写target - 目标语言缩写Exceptionpublic String nlpSpeechTranslate(int format, int seq, int end, String session_id, String filePath, String source, String target) throws Exception
format - 语音压缩格式编码seq - 语音分片所在语音流的偏移量end - 是否结束分片标识session_id - 语音唯一标识(同一应用内)filePath - 待识别语音文件(本地路径)source - 源语言缩写target - 目标语言缩写ExceptionCopyright © 2018. All rights reserved.