PHP Classes
elePHPant
Icontem

check similariries between text files: i want to check different text documents to find similarities

Recommend this page to a friend!
  All requests RSS feed  >  check similariries between text files  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

check similariries between text files

Edit

by Ayuba Dauda - 7 months ago (2018-06-07)

i want to check different text documents to find similarities

This request is clear and relevant.
This request is not clear or is not relevant.

+1

Am developing a plagiarism detection software with laravel and am at a point where i want to fetch a text file and compare it with other text files to find matching contents

Ask clarification

2 Recommendations

PHP Text Comparison: Compare two texts to find similar sentences

This recommendation solves the problem.
This recommendation does not solve the problem.

0

by riccardo castagna package author package author Reputation 155 - 6 months ago (2018-06-27) Comment

This php package is useful to compare two different texts in the hypothesis that the two source texts have a good spelling and a correct punctuation. It finds similar sentences and returns the percentages, these percentages are the measures of how much the sentences are similar with each others. Possible applications and uses could be in the field of journalism, for example, to find the similar articles, in the cases of plagiarism, for investigations of various kinds when it is necessary to analyze and compare texts with each other. I hope this could be useful for the developing of your software

  • 1 Comment
  • 1. by riccardo castagna package author package author - 6 months ago (2018-07-02) Reply

    just a note: when I read this request for the first time, there was still nothing published about it. So, I started working on it. It was not my intention to be in competition with someone but only collaborative. In any case, it went like this, maybe it's better for you, so you can have two different points of view on how to solve your request and you can take a cue from both solutions, both from my colleague and from mine. I wish you good luck with your project.


PHP Similar Text Percentage: Compare two strings to compute a similarity score

This recommendation solves the problem.
This recommendation does not solve the problem.

0

by zinsou A.A.E.Mo´se package author package author Reputation 5445 - 6 months ago (2018-06-26) Comment

The habit here is to recommend the best package to achieve the asked purpose,however for want of the best I suggest this package that you can use this way :

require the main class file then in your script use this function

function similarfile($ffile,$sfile,$round=2,$insensitive=true,&$stat=null,&$diff=null){

if(!file_exists($ffile)||!file_exists($sfile)) return false;
$diff=array();
return similarText(file_get_contents($ffile),file_get_contents($sfile),$round,$insensitive,$stat,$diff);

}

eg: echo '<pre>'; var_dump(similarFile(__FILE__,__FILE__,2,true,$stats,$diff),$stats,$diff);

will print

float(100) array(3) { ["reallycontain"]=> bool(true) ["contain"]=> bool(true) ["percentageRc"]=> int(100) } array(0) { }


Recommend package
: 
: