/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 2003-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#include "vcwhdr.h"
/* Method to compute a matching window in source data using
** n-gram frequencies to determine similarity.
**
** Written by Kiem-Phong Vo (kpv@research.att.com)
*/
/* structure to search windows using frequency matching */
typedef struct _freq_s
} Freq_t;
#if __STD_C
#else
Sfoff_t l, r; /* interval to search */
#endif
{
double dif;
int mtch;
if(l < 0)
l = 0;
return 1.;
return 1.;
}
}
#if __STD_C
#else
#endif
{
int i;
{
l = 0;
r = max;
/* glom together all overlapping intervals */
break;
r = max;
}
return 1.;
break;
}
}
#if __STD_C
#else
#endif
{
int mtch;
double dif;
/* if has not been successful, stop doing it */
return 1.;
/* unseekable */
goto f_err;
/* search a neighborhood in target file */
pos = 0;
return 1.;
goto f_err;
f_err: /* will never try searching target file again */
return 1.;
}
}
}
#if __STD_C
#else
#endif
{
return NIL(Vcwmatch_t*);
/* size of result from last compression */
/* search back an area in target file for matches */
goto done;
/* if last compression result is good, try next sequential position */
goto done;
/* find places in source file likely to have matches */
goto done;
/* target file matches should be more stringent */
return NIL(Vcwmatch_t*);
}
}
else
}
/* add a little extra around the computed window */
}
/* get window data */
return NIL(Vcwmatch_t*);
return wm;
}
/* Event handler */
#if __STD_C
#else
int type;
#endif
{
switch(type)
{
case VCW_OPENING:
return -1;
return -1;
}
break;
case VCW_CLOSING:
}
break;
}
return 0;
}
{ frmatch,
"vote",
"Find windows by voting for matches.",
"[-version?window::vote (AT&T Research) 2003-01-01]" USAGE_LICENSE,
};