python - Find longest substring of text and pattern -


is there a function in python, returns index of longest common substring of text , given pattern in case pattern has start substring?

text = lorem ipsum dolor sit amet, consectetur adipisici elit pattern = amegt 

22

you looking "suffix tree" algorithm: http://en.wikipedia.org/wiki/longest_common_substring_problem

your solution should this: https://github.com/kvh/python-suffix-tree

there example there on how use library. need far understand requirements.

let me know if need additional help.

cheers, alex


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -