Hi, thank you for your package! I found strange behavior when there are repeating units at the beginning of the string:
library(text.alignment)
smith_waterman("a b c d", "a b c d", type = "words") # expected
#> Swith Waterman local alignment score: 8
#> ----------
#> Document a
#> ----------
#> a b c d
#> ----------
#> Document b
#> ----------
#> a b c d
smith_waterman("a a b c d", "a a b c d", type = "words") # not expected
#> Swith Waterman local alignment score: 10
#> ----------
#> Document a
#> ----------
#> # a b c d
#> ----------
#> Document b
#> ----------
#> a a b c d
smith_waterman("a a a b c d", "a a a b c d", type = "words") # not expected
#> Swith Waterman local alignment score: 12
#> ----------
#> Document a
#> ----------
#> # a # a b c d
#> ----------
#> Document b
#> ----------
#> a # a a b c d
If I put repetitions in any other place of the string other then beginning, everything works fine as I expected...
Hi, thank you for your package! I found strange behavior when there are repeating units at the beginning of the string:
If I put repetitions in any other place of the string other then beginning, everything works fine as I expected...