私は大きな文字列とサブストリングの配列を持っています。例えば (文字列の間の微妙な違いに注意してください): large_str = "hello, this is a long string, that may be made up of multiple
substrings that approximately match the original string"
sub_strs =
任意の2つの配列間のLevenshtein距離を計算したいと思います。 a <- 1:100
b <- c(1, 1:100)
edit_distance(a, b) == 1
私はadist機能とstringdistパッケージの承知していますが、彼らは唯一の文字ベクトルに働きます。シーケンス内のシンボルの数が少ない場合、それらを文字としてエンコードし、上記の関数を使用することができます