语种识别-nlpTextDetect
返回内容介绍
public static String sample(TAipNlp client) throws Exception {
//参数内容
String text = "こんにちは";//待识别文本
int force = 0;//是否强制从候选语言中选择(只对二选一有效)
String result = client.nlpTextDetect(text,force);//语种识别
return result;
}
public static String sample(TAipNlp client) throws Exception {
//参数内容
String text = "こんにちは";//待识别文本
String candidate_langs = "zh";//备选语言缩写
int force = 0;//是否强制从候选语言中选择(只对二选一有效)
String result = client.nlpTextDetect(text,candidate_langs ,force);//语种识别
return result;
}