I have been doing a project for Compilers lab with my friend Sundar. It involves developing a plagiarism detection tool using citation analysis. Sounds fancy huh? I don’t mean to brag about it, but this is ‘one of a kind’ project. We are still in the beta stages. Looking forward to complete it asap. Meanwhile, this post will be my activity log of the project.

CSS3 Animated Landing page

First of all, I designed a splash page using CSS3 for my project. Actually, the original design was by CoDrops. I just made a few tweaks. *Yeah, I can hear you. It’s a free design, so that doesn’t make me a plagiarist!* 😉

Here is a screenshot:



Normalized Compression Distance [NCD]

function ncd_new($sx, $sy, $prec=0, $MAXLEN=9000)
/* NCD with gzip artifact correctoin and percentual return.
   sx,sy = strings to compare.
   Use $prec=-1 for result range [0-1], $pres=0 for percentual,
   For NCD definition see http://arxiv.org/abs/0809.2553 */
 $x = $min = strlen(gzcompress($sx));
 $y = $max = strlen(gzcompress($sy));
 $xy= strlen(gzcompress($sx.$sy));
 $a = $sx;
 if ($x>$y) {
//swap min/max
 $min = $y;
 $max = $x;
 $a = $sy;
//NCD definition.
 $res = ($xy-$min)/$max;

//Little strings:
 if ($MAXLEN<0 || $xy<$MAXLEN) {
 $aa= strlen(gzcompress($a.$a));
 $ref = ($aa-$min)/$min;
 $res = $res - $ref; //correction
 return ($prec<0)? $res: 100*round($res,2+$prec);