PHP article similarity comparison, through Similar_text () comparison is a bit slow, can there be any good efficiency?
If the content of the article is to be compared by storing it all in text,
Is this method feasible through Similar_text () comparisons?
Reply to discussion (solution)
This post was last edited by xuzuning on 2013-07-31 17:54:18
File difference commands that can be supplied with the operating system
Linux:diff
Window:fc
They're all done by line, and the more rows you report, the lower the natural similarity.
File difference commands that can be supplied with the operating system
Linux:diff
Window:fc
They are all processed by line, the more the number of rows reported, the lower the natural similarity is how to achieve it?
For example (window)
System ("FC 1.txt 2.txt > 3.txt"); ReadFile (' 3.txt ');
Linux also has the WC command to get the number of lines in the file
You can also use Exec to return an array of differential results directly
EXEC ("FC 1.txt 2.txt", $a);p rint_r ($a);
If you have the ability, you can also download and compile the Xdiff extension
You can also use Exec to return an array of differential results directly
EXEC ("FC 1.txt 2.txt", $a);p rint_r ($a);
If you have the ability, you can also download and compile the Xdiff extension
You can also use Exec to return an array of differential results directly
EXEC ("FC 1.txt 2.txt", $a);p rint_r ($a);
If you have the ability, you can also download and compile the Xdiff extension
You can also use Exec to return an array of differential results directly
EXEC ("FC 1.txt 2.txt", $a);p rint_r ($a);
If you have the ability, you can also download and compile the Xdiff extension
You can also use Exec to return an array of differential results directly
EXEC ("FC 1.txt 2.txt", $a);p rint_r ($a);
If you have the ability, you can also download and compile the Xdiff extension
You can also use Exec to return an array of differential results directly
EXEC ("FC 1.txt 2.txt", $a);p rint_r ($a);
If you have the ability, you can also download and compile the Xdiff extension
What should I do if I read the database table information directly, traverse the content, and compare it to the article content that needs to be compared?
If I first participle, in the comparison by similarity, write algorithm What, is it possible?
Because once the database article data volume, by the database content to deposit text, then compare, will not be too slow?
You can also use Exec to return an array of differential results directly
EXEC ("FC 1.txt 2.txt", $a);p rint_r ($a);
If you have the ability, you can also download and compile the Xdiff extension
I don't know how to do this.