String searching algorithm for Chinese characters
There is Python code available for normal string searching algorithms, such as Boyer-Moore. I am looking to use this on Chinese characters, but it doesn't seem like the same implementation would work. What would I do in order to make the algorithm work with Chinese characters? I am referring to this:
http://en.literateprograms.org/Boyer-Moore_st开发者_开发百科ring_search_algorithm_(Python)#References
As long as all your text is in unicodes it should work just fine. The algorithm looks sequence-independent, provided each "element" is one sequence-unit in length.
精彩评论