2

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_string_search_algorithm_(Python)#References

Makoto
  • 104,088
  • 27
  • 192
  • 230
Jack Low
  • 51
  • 1
  • 3

1 Answers1

3

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.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358