注意:以下文档只适用于TOP接口,请谨慎使用!

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

alibaba.alifanyi.monoligual.quality (翻译平台单语质检服务)

翻译平台数据质量分接口。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
lang String 可选 en
  • 默认值:en
  • 语种,目前支持 en/ru/es/fr
    query String 可选 2 this is a test. development
  • 默认值:2 this is a test. development
  • 被检测文本,无需分词等处理
    use_lm Number 可选 0
  • 默认值:0
  • 默认0,1代表选择GPU模型,0代表不选择GPU模型

    响应参数

    名称 类型 示例值 描述
    result DmpResult 最终结果类
    • └ code
    • Number
    • 200
    • 结果码:200代表正确结果
    • data
    • MonoQualityCommonRtnDto
    • 单语质检结果类
    • └ has_price
    • Boolean
    • 是否包含价格
    • └ in_text
    • String
    • 输入文本
    • └ lang
    • String
    • 语种
    • └ lm_boxcox_score
    • String
    • 转换后的分数
    • └ lm_ppl
    • String
    • 言模型混淆度分数,大于0。
    • └ lm_score
    • String
    • 语言模型分数(老版本)
    • └ punctuation_num
    • Number
    • 标点数量
    • └ sensitive_words
    • String
    • 敏感词
    • sent_detail_score_list
    • SentDetailScoreDo []
    • 对输入文本句子切分后,每个子句的质量信息
    • └ lm_boxcox_score
    • String
    • 转换后的分数,越大表示句子文本质量越高。范围 (0~100)
    • └ lm_ppl
    • String
    • 语言模型混淆度分数,大于0。
    • └ lm_score
    • String
    • 语言模型分数(老版本)
    • └ sent
    • String
    • 句子
    • └ spell_correction_result
    • String
    • 拼写纠错结果
    • └ spell_ter
    • Number
    • 拼写纠错结果
    • words_check_results
    • WordsCheckResultsDo
    • 其它检查项的检查结果
    • all_uppercase_list
    • PositionDo []
    • 有问题的全大写词
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • duplicate_list
    • PositionDo []
    • 单词重复(单复数、时态等)
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • first_word_not_uppercase_list
    • PositionDo []
    • 首个单词未首字母大写
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • function_word_not_lowercase_list
    • PositionDo []
    • 虚词没有小写
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • ner_words_list
    • PositionDo []
    • 命名实体识别单词
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • not_english_word_list
    • PositionDo []
    • 非英文词
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • notional_word_not_first_uppercase_list
    • PositionDo []
    • 实词没有首字母大写
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • notional_word_not_lowercase_list
    • PositionDo []
    • 实词没有小写
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • special_chars_list
    • PositionDo []
    • 特殊字符
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • spelling_err_list
    • PositionDo []
    • 拼写错误词
    • └ begin
    • Number
    • 在句中开始位置
    • └ end
    • Number
    • 在句中结束位置
    • └ word
    • String
    • 单词
    • └ zh_num
    • Number
    • 汉字数量
    • └ error_msg
    • String
    • 错误信息

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    AlibabaAlifanyiMonoligualQualityRequest req = new AlibabaAlifanyiMonoligualQualityRequest();
    req.setLang("en");
    req.setQuery("2 this is a test. development");
    req.setUseLm(0L);
    AlibabaAlifanyiMonoligualQualityResponse rsp = client.execute(req);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <alibaba_alifanyi_monoligual_quality_response>
        <result>
            <code>200</code>
            <data>
                <has_price></has_price>
                <in_text></in_text>
                <lang></lang>
                <lm_boxcox_score></lm_boxcox_score>
                <lm_ppl></lm_ppl>
                <lm_score></lm_score>
                <punctuation_num></punctuation_num>
                <sensitive_words></sensitive_words>
                <sent_detail_score_list>
                    <sent_detail_score_do>
                        <lm_boxcox_score></lm_boxcox_score>
                        <lm_ppl></lm_ppl>
                        <lm_score></lm_score>
                        <sent></sent>
                    </sent_detail_score_do>
                </sent_detail_score_list>
                <spell_correction_result></spell_correction_result>
                <spell_ter></spell_ter>
                <words_check_results>
                    <all_uppercase_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </all_uppercase_list>
                    <duplicate_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </duplicate_list>
                    <first_word_not_uppercase_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </first_word_not_uppercase_list>
                    <function_word_not_lowercase_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </function_word_not_lowercase_list>
                    <ner_words_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </ner_words_list>
                    <not_english_word_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </not_english_word_list>
                    <notional_word_not_first_uppercase_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </notional_word_not_first_uppercase_list>
                    <notional_word_not_lowercase_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </notional_word_not_lowercase_list>
                    <special_chars_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </special_chars_list>
                    <spelling_err_list>
                        <position_do>
                            <begin></begin>
                            <end></end>
                            <word></word>
                        </position_do>
                    </spelling_err_list>
                </words_check_results>
                <zh_num></zh_num>
            </data>
            <error_msg></error_msg>
        </result>
    </alibaba_alifanyi_monoligual_quality_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

    返回
    顶部