Message258582
For strings 'aaaaaa', 'aabaaa' SequenceMatcher's algorithm finds only common substring 'aaa', while well-known classic LCS algorithm: http://www.geeksforgeeks.org/printing-longest-common-subsequence/ finds 'aa' and 'aaa'.
Is it the price for "best case time is linear", as mentioned in difflib's documentation? Are there any other reasons not to implement classic LCS algorith (e.g. memory limits?)? If no, maybe it will be usefull to create subclass StrictSequenceMatcher? |
|
Date |
User |
Action |
Args |
2016-01-19 11:06:38 | Contego | set | recipients:
+ Contego |
2016-01-19 11:06:38 | Contego | set | messageid: <1453201598.83.0.994407990741.issue26150@psf.upfronthosting.co.za> |
2016-01-19 11:06:38 | Contego | link | issue26150 messages |
2016-01-19 11:06:38 | Contego | create | |
|