我有:
phrase = "will have to buy online pass from EA to play online but its in perfect condition"
phrases = ["its",
"perfect condition",
"but its",
"in perfect condition",
"from EA",
"buy online pass from EA",
"to play online but its in perfect condition",
"online",
"online pass",
"play online but its in perfect condition",
"online but its",
"EA",
"will have to buy online pass from EA to play online but its in perfect condition",
"have to buy online pass from EA to play online but its in perfect condition",
"u",
"pass",
"to buy online pass from EA"]
我想从数组中找到两个短语,它们在 6-10 个单词的限制范围内并且单词重叠最少......
就像是:
result = ["to buy online pass from EA", "play online but its in perfect condition"]
将是完美的.. 最好的方法是什么?