41 #define PROGRAM_FEATURE_TYPE "cn"
57 const char *Directory,
58 LIST LabeledProtoList,
72 BOOL8 WriteInsigProtos);
89 int main(
int argc,
char* argv[])
146 const char *PageName;
160 printf(
"Reading %s ...\n", PageName);
161 TrainingPage =
Efopen(PageName,
"rb");
163 100,
NULL, TrainingPage, &CharList);
164 fclose(TrainingPage);
167 printf(
"Clustering ...\n");
171 pCharList = CharList;
188 printf(
"0 significant protos for %s."
189 " Retrying clustering with MinSamples = %f%%\n",
197 if (Clusterer ==
NULL) {
198 fprintf(stderr,
"Error: NULL clusterer!\n");
216 const char *Directory,
217 LIST LabeledProtoList,
239 if (Directory !=
NULL && Directory[0] !=
'\0')
241 Filename += Directory;
244 Filename +=
"normproto";
245 printf (
"\nWriting %s ...", Filename.
string());
254 printf (
"\nError! Not enough protos for %s: %d protos"
255 " (%d significant protos"
256 ", %d insignificant protos)\n",
257 LabeledProto->
Label, N,
262 fprintf(File,
"\n%s %d\n", LabeledProto->
Label, N);
274 BOOL8 WriteSigProtos,
275 BOOL8 WriteInsigProtos)