Text comparison algorithm

前端 未结 6 1292
悲哀的现实
悲哀的现实 2020-11-27 03:29

We have a requirement in the project that we have to compare two texts (update1, update2) and come up with an algorithm to define how many words and how many sentences have

6条回答
  •  失恋的感觉
    2020-11-27 03:58

    The difficulty comes when comparing large files efficiently and with good performance. I therefore implemented a variation of Myers O(ND) diff algorithm - which performs quite well and accurate (and supports filtering based on regular expression):

    Algorithm can be tested out here: becke.ch compare tool web application

    And a little bit more information on the home page: becke.ch compare tool

提交回复
热议问题