首页 > 解决方案 > Get exist words from text with regex

问题描述

I am using firebase ml kit for words recognition in images. Actually it works pretty good. But sometimes it`s returns some kind of gibrish. So my question is any library exist for recognition exist words from text? (String) Or maybe I can use some kind of regex combination to get such result. Thanks in advance.

enter image description here

标签: androidfirebase-mlkit

解决方案


您可以使用正则表达式来做到这一点。将所有值存储在 List 或 Arraylist 中,然后将列表的每个值或位置与适当的正则表达式匹配。这需要时间,但至少你不能得到 100% 的结果,但 75-80% 会起作用。


推荐阅读