识别图像并返回处理后的文本结果 Args: image_path: 图像文件路径 Returns: ProcessedText: 处理后的文本结果,失败时返回None
(self, image_path: str)
| 272 | return primary_text, secondary_text |
| 273 | |
| 274 | def recognize_image(self, image_path: str) -> Optional[ProcessedText]: |
| 275 | """ |
| 276 | 识别图像并返回处理后的文本结果 |
| 277 | |
| 278 | Args: |
| 279 | image_path: 图像文件路径 |
| 280 | |
| 281 | Returns: |
| 282 | ProcessedText: 处理后的文本结果,失败时返回None |
| 283 | """ |
| 284 | text, _ = self.extract_text_from_image(image_path) |
| 285 | if text: |
| 286 | return self.process_text(text) |
| 287 | return None |
| 288 | |
| 289 | def get_word_list(self, image_path: str) -> List[str]: |
| 290 | """ |
nothing calls this directly
no test coverage detected