1
我的問題是有點前傳中Visualise distances between texts比較句子或段落的表
問我有一個表有兩個句子來比較每個觀察的問題。
compare <- read.table(header=T,sep="|", text=
"person | text1 | text2
person1 | the quick brown fox jumps over the lazy dog | the quick cat jumps on the fast fog
person2 | I dont want to work today | I feel like working today
"
)
我想要一列,其中的值表示每個觀察的兩個句子之間的差異。 基本上我正在尋找類似於agrep
的功能,但用於比較句子或段落。
該示例的預期輸出是多少? –
這有幫助嗎? http://stackoverflow.com/questions/3182091/fast-levenshtein-distance-in-r – Superbest