I'm using google-diff-match-patch to compare plain text in natural languages.
How can I make google-diff-match-patch to ignore certain characters? (Some tiny differences which I don't care.)
For example, given text1:
give me a cup of bean-milk. Thanks.
and text2:
please give mom a cup of bean milk! Thank you.
(Note that there are two space characters before 'Thank you'.)
google-diff-match-patch outputs something like this:
[please] give m(e)[om] a cup of bean(-)[ ]milk(.)[!] Thank(s)[ you].
It seems that google-diff-match-patch only ignores different numbers of white spaces.
How can I tell google-diff-match-patch to also ignore characters like [-.!]
?
The expect result would be
[please] give m(e)[om] a cup of bean-milk. Thank(s)[ you].
Thanks.