String searching algorithms in Java

前端 未结 5 2078
不知归路
不知归路 2021-01-01 07:29

I am doing string matching with big amount of data.

EDIT: I am matching words contained in a big list with some ontology text files. I take each file from ontology,

5条回答
  •  梦谈多话
    2021-01-01 08:00

    you can use BM algorithm for search in text files for single pattern, and repeat this algorithm for all the patterns you have in your list.

    the other best solution is to use multi-pattern search algorithms like: Aho–Corasick string matching algorithm

提交回复
热议问题