文档中心 > API类目 > 阿里翻译API

alibaba.dot.sentence.split (DOT切句)

句子切分接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
source_lang String 必须 en 源语种
target_lang String 必须 zh 目标语种
text_format String 必须 text 文本格式(text/json/html)
query String 必须 hello 待处理文本
ext_param String 可选 {} 扩展参数

响应参数

名称 类型 示例值 描述
result_code Number 200 状态码
result String [] hello 切句结果
error_msg String message 异常信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaDotSentenceSplitRequest req = new AlibabaDotSentenceSplitRequest();
req.setSourceLang("en");
req.setTargetLang("zh");
req.setTextFormat("text");
req.setQuery("hello");
req.setExtParam("{}");
AlibabaDotSentenceSplitResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_dot_sentence_split_response>
    <result_code>200</result_code>
    <result>
        <string>hello</string>
    </result>
    <error_msg>message</error_msg>
</alibaba_dot_sentence_split_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部