我一直在寻找一段时间,但到目前为止没有找到适合我需要的东西。(这很有帮助,但没有说服力)
从两个不同的来源,我得到两个不同的字符串。我想检查较短的是否包含在较大的中。但是,由于这些字符串都以 OCR 文档为根,因此可能存在明显差异。
例子:
String textToSearch = "Recognized Headline";
String documentText = "This is the document text, spanning multiple pages" .
"..." .
"..." .
"This the row with my Recognizect Head1ine embedded" .
"..." . ^^^^^^^^^^^^^^^^^^^^
"..." .
"End of the document";
如何在不使用独立 Lucene/Solr 安装的情况下在页面中可靠地找到我的字符串?(或者也许我只是没有找到教程/手册)。一定有一些图书馆可以做到这一点,对吧?