Text difference algorithm

后端 未结 11 2124
温柔的废话
温柔的废话 2020-11-27 10:56

I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar fi

11条回答
  •  甜味超标
    2020-11-27 11:37

    Look at difflib. (Python)

    That will calculate the diffs in various formats. You could then use the size of the context diff as a measure of how different two documents are?

提交回复
热议问题