marquesLuis / google-diff-match-patch

Automatically exported from code.google.com/p/google-diff-match-patch
Apache License 2.0
0 stars 0 forks source link

java code bug #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
when i compare the following two text on sit   
"ZHEJIANG JIANGLONG TEXTILE PRINTING" and   
"ZHEJIANG JIANGLIMEI KNITTING CLOTH"
with Match balance=0.6 and Match threshold: 0.4 
i have two results: 
The first when using Demo of Match on the site(JavaScript)the result is
don't match 
the second result when using java code in my application the result is
match ok (found)
what is the difference?

Original issue reported on code.google.com by ala...@gmail.com on 9 Sep 2008 at 12:12

GoogleCodeExporter commented 8 years ago
any one answer me please 

Original comment by ala...@gmail.com on 11 Sep 2008 at 9:37

GoogleCodeExporter commented 8 years ago
Hello alaa,

Thanks for the report.  Both of them return the same thing for me: -1

dmp.Match_Balance = 0.6f;
dmp.Match_Threshold = 0.4f;
System.out.println(dmp.match_main("ZHEJIANG JIANGLONG TEXTILE PRINTING",
    "ZHEJIANG JIANGLIMEI KNITTING CLO", 0));

In both cases, if the Threshold is increased to 0.8, it starts matching.  Note 
that
the pattern is limited to 32 characters, so I dropped the "TH" from the end.

I don't see any discrepancy between the JavaScript and the Java.  Feel free to 
reopen
this bug with more info if you are still seeing this issue.

Original comment by neil.fra...@gmail.com on 11 Sep 2008 at 11:25