Skip to content

Add alignment and fix a bug#9

Open
kuangkzh wants to merge 14 commits intoMeteorix:masterfrom
kuangkzh:master
Open

Add alignment and fix a bug#9
kuangkzh wants to merge 14 commits intoMeteorix:masterfrom
kuangkzh:master

Conversation

@kuangkzh
Copy link

  1. Fix bug: The previous levenshtein_distance return 0 when either input is "". Like levenshtein_distance("aaa", "")=0 which should be 3 instead.

  2. Add function:

  • lcs_sequence_idx

  • lcs_string_idx

  • levenshtein_distance_idx

  • edit_distance_idx
    mapping indices from str1 to reference

  • levenshtein_distance(str1, str2, weight) for weighted edit distance.
    All functions are updated with README and unittests.

  1. Format code and doc:
  • Longest common subsequence as lcs_sequence_xxx
  • Longest common substring as lcs_string_xxx
    _xxx including _length, _idx, _of_list.
    For compatibility, all previous function names are all preserved.

kuangkzh and others added 7 commits October 29, 2021 09:42
…_string_xx()。同时保留原有的lcs和lcs2的接口。

2.加入函数lcs_sequence_idx(),lcs_string_idx()返回子串或子序列的下标,反映两段文本的对齐关系。
…-fix-windows-10-install-issues

Import Algorithm - Fixes Windows 10 Install Errors
@kuangkzh kuangkzh force-pushed the master branch 2 times, most recently from e8bceb7 to d9dbf07 Compare February 11, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants