How to Calculate the Keyword Count in a Particular page in java. I want to Know the ALgo for that.
Asked
Active
Viewed 129 times
2 Answers
3
Boyer-Moore String Search Algo
If you want to talk about algorithm the string search algorithm famous is Boyer-Moore String search algorithm.
A Java based implementation of Boyer-Moore can be found at http://algs4.cs.princeton.edu/53substring/BoyerMoore.java.html
KMP Algorithm
Another algorithm which can search with substring too is Knuth-Morris-Pratt(KMP) algorithm.
A Java based implementation of KMP can be found at http://tekmarathon.wordpress.com/2013/05/14/algorithm-to-find-substring-in-a-string-kmp-algorithm/

AurA
- 12,135
- 7
- 46
- 63