查询文本顺滑结果
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
text_smooth_param_dto | TextSmoothParamDTO | 可选 | 顺滑参数对象 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ocr_result_dto | OcrResultDTO | 顺滑结果对象 | |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); AlibabaIntlTranslationplatformTextsmoothGetRequest req = new AlibabaIntlTranslationplatformTextsmoothGetRequest(); AlibabaIntlTranslationplatformTextsmoothGetRequest.TextSmoothParamDTO obj1 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.TextSmoothParamDTO(); obj1.setSourceLang( "zh" ); obj1.setAppName( "cloud_alimtct_it_ecommerce" ); obj1.setContextId( "3e1c6b0d48c3446ea5658078c4438db6" ); AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrResultDTO obj2 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrResultDTO(); obj2.setOrgWidth(882L); obj2.setWidth(882L); obj2.setWordNum(2L); obj2.setAngle(0L); List<AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrTableInfoDTO> list4 = new ArrayList<AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrTableInfoDTO>(); AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrTableInfoDTO obj5 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrTableInfoDTO(); list4.add(obj5); List<AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrTableCellInfoDTO> list8 = new ArrayList<AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrTableCellInfoDTO>(); AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrTableCellInfoDTO obj9 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrTableCellInfoDTO(); list8.add(obj9); List<AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord> list12 = new ArrayList<AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord>(); AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord obj13 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord(); list12.add(obj13); obj13.setX(1L); obj13.setY(1L); list10.setPos(list12); obj9.setYec(2L); obj9.setXec(2L); obj9.setYsc(1L); obj9.setTableCellId(1L); obj9.setXsc(1L); obj9.setWord( "Hello" ); list6.setCellInfos(list8); obj5.setXCellSize(0L); obj5.setTableId(0L); obj5.setYCellSize(0L); obj2.setTableInfoDtoList(list4); obj2.setOrgHeight(800L); obj2.setTrgLang( "en" ); List<AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrCoordDTO> list15 = new ArrayList<AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrCoordDTO>(); AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrCoordDTO obj16 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.OcrCoordDTO(); list15.add(obj16); AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord obj18 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord(); obj18.setX(14L); obj18.setY(657L); list17.setDownLeft(obj18); obj16.setConfidence( "0.99" ); AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord obj20 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord(); obj20.setX(595L); obj20.setY(604L); list19.setUpRight(obj20); AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord obj22 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord(); obj22.setX(14L); obj22.setY(604L); list21.setUpLeft(obj22); AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord obj24 = new AlibabaIntlTranslationplatformTextsmoothGetRequest.Coord(); obj24.setX(595L); obj24.setY(657L); list23.setDownRight(obj24); obj16.setTableId(0L); obj16.setTableCellId(0L); obj16.setText( "一件包邮送头饰团扇眉心贴" ); obj16.setDirection(0L); obj16.setInEntity( false ); obj16.setIdNumber(0L); obj16.setNeedFusion( true ); obj16.setNeedTranslate( true ); obj2.setOcrCoordDtoList(list15); obj2.setSrcLang( "zh" ); obj2.setSid( "2d32d1" ); obj2.setHeight(800L); obj1.setOcrResultDto(obj2); req.setTextSmoothParamDto(obj1); AlibabaIntlTranslationplatformTextsmoothGetResponse rsp = client.execute(req); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | < alibaba_intl_translationplatform_textsmooth_get_response > < ocr_result_dto > < org_width >882</ org_width > < width >882</ width > < word_num >2</ word_num > < angle >0</ angle > < table_info_dto_list > < ocr_table_info_d_t_o > < cell_infos > < ocr_table_cell_info_d_t_o > < pos > < coord > < x >1</ x > < y >3</ y > </ coord > </ pos > < yec >2</ yec > < xec >1</ xec > < ysc >2</ ysc > < table_cell_id >1</ table_cell_id > < xsc >1</ xsc > < word >你好</ word > </ ocr_table_cell_info_d_t_o > </ cell_infos > < x_cell_size >4</ x_cell_size > < table_id >0</ table_id > < y_cell_size >3</ y_cell_size > </ ocr_table_info_d_t_o > </ table_info_dto_list > < org_height >800</ org_height > < trg_lang >en</ trg_lang > < ocr_coord_dto_list > < ocr_coord_d_t_o > < down_left > < x >14</ x > < y >657</ y > </ down_left > < confidence >0.99</ confidence > < up_right > < x >595</ x > < y >604</ y > </ up_right > < up_left > < x >14</ x > < y >604</ y > </ up_left > < down_right > < x >595</ x > < y >657</ y > </ down_right > < table_id >0</ table_id > < table_cell_id >0</ table_cell_id > < text >一件包邮送头饰团扇眉心贴</ text > < direction >0</ direction > < in_entity >false</ in_entity > < id_number >0</ id_number > < need_fusion >true</ need_fusion > < need_translate >true</ need_translate > </ ocr_coord_d_t_o > </ ocr_coord_dto_list > < src_lang >zh</ src_lang > < sid >23fe23q1</ sid > < height >800</ height > </ ocr_result_dto > </ alibaba_intl_translationplatform_textsmooth_get_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|