2
私の目的は、2つのテキストから似たフレーズを見つけることです。2つのテキスト間で一致するフレーズを検索しますか?
私はよくある言葉が問題になることを知っています。たとえば、and the
we are the
です。その場合、フィルターが必要になると思います。
これは良いアプローチであるかどうかを知りたいですか?これは再帰を使用します。一致するものが見つかった場合は、次の単語も一致するかどうかを確認し、一致がなくなるまで続けます。
1. the cat is on the roof
2. a man is on the stage
A1 = [the, cat, is, on, the, roof]
A2 = [a, man, is, on, the, stage]
[the]: no match
[cat]: no match
[is]: match
[is, on]: match
[is, on, the]: match
[is, on, the, roof]: no match
[on]: match
[on, the]: match
[on, the, roof]: no match
[the]: match
[the, roof]: no match
[roof]: no match
-end-
あなたはアプローチにアドバイスしたいと思いますが、アプローチがうまくいくとコードを表示できますか? – RageZ