math term post

本文解析了数学中的两个基本概念:留数(residuals)与余数(remainder),并探讨了它们在算术运算中的作用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

residuals   留数


arithmetical complement 

remainder  余数

java 我的ocr识别 上下字符字母紧连着识别错误 private String extractImageText(MultipartFile file) { try (InputStream is = file.getInputStream()) { BufferedImage image = ImageIO.read(is); if (image == null) { return MessageUtils.message("Image.parsing.failed"); } //OCR识别 String result = tesseract.doOCR(image); result = postProcess(result); // result = result.replaceAll("\\s+", " ").trim(); System.out.println("图片内容:\n" + result); return result; } catch (Exception e) { e.printStackTrace(); return MessageUtils.message("file.read.picture.error"); } } /** * 比较和校验数据 */ public List<ValidationResult> compareAndValidate(String fileContent, JsonNode jsonConfig) { List<ValidationResult> results = new ArrayList<>(); // 处理 JSON 结构对象/数组 JsonNode dataNode = jsonConfig.isArray() && jsonConfig.size() > 0 ? jsonConfig.get(0) : jsonConfig; // HanLP文本分词 List<String> hanlpTest = HanLP.segment(fileContent).stream() .map(term -> term.word.replaceAll("\\s+", "").toLowerCase()) .collect(Collectors.toList()); System.out.println("分词的效果:" + hanlpTest); // 遍历JSON dataNode.fields().forEachRemaining(entry -> { String key = entry.getKey(); String value = entry.getValue().asText(); List<String> hanlpJsonTest = HanLP.segment(value).stream() .map(term -> term.word.replaceAll("\\s+", "").toLowerCase()) .collect(Collectors.toList()); if (!hanlpJsonTest.isEmpty()) { boolean found = isMatch(hanlpTest, hanlpJsonTest); if(found){ log.info("字段对比成功:{}",hanlpJsonTest); }else{ log.info("字段对比失败:{}",hanlpJsonTest); } results.add(new ValidationResult( "FIELD", key, String.join("", hanlpJsonTest), found ? "Found" : "Not Found", found )); } }); return results; } private boolean isMatch(List<String> test, List<String> valueTokens) { String Joined = String.join("", test); String valueJoined = String.join("", valueTokens); return Joined.contains(valueJoined); } 这个是我的代码 我读取的时候 比如说上下俩个字母和字符亲密在一块的时候 就识别错误 就是乱识别
07-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值