查找两个字符串之间的多个差异
我想找出两个字符串之间的差异。例如,如果
line1 = "My name is ABC"
line2 = "My age is xyz"
那么我应该能够得到名称 - 年龄和 ABC - xyz 的差异。
我想我可以使用编辑距离,但无法弄清楚。非常感谢任何帮助。
I want to find the differences between two strings. For example, if
line1 = "My name is ABC"
line2 = "My age is xyz"
Then I should be able to get the differences that name - age and ABC - xyz.
I think I can use Levenshtein distance, but can't figure it out. Any help is greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)