#include "featdefs.h"
#include "oldlist.h"
#include "blobs.h"
Go to the source code of this file.
Macro Definition Documentation
#define DisableCharDisplay |
( |
| ) |
(DisplayCharacters = FALSE) |
#define DisableMatchDisplay |
( |
| ) |
(DisplayMatchList = FALSE) |
#define EnableCharDisplay |
( |
| ) |
(DisplayCharacters = TRUE) |
Include Files and Type Defines —————————————————————————-
Definition at line 32 of file blobclass.h.
#define EnableMatchDisplay |
( |
| ) |
(DisplayMatchList = TRUE) |
Function Documentation
Public Function Prototypes —————————————————————————-
Public Code —————————————————————————-
Definition at line 52 of file blobclass.cpp.
{
#define TRAIN_SUFFIX ".tr"
static FILE *FeatureFile =
NULL;
if (CurrFontName == kUnknownFontName) {
const char *basename = strrchr(filename.
string(),
'/');
const char *firstdot = strchr(basename ? basename : filename.
string(),
'.');
const char *lastdot = strrchr(filename.
string(),
'.');
if (firstdot != lastdot && firstdot !=
NULL && lastdot !=
NULL) {
++firstdot;
CurrFontName = firstdot;
CurrFontName[lastdot - firstdot] = '\0';
}
}
if (FeatureFile ==
NULL) {
FeatureFile =
Efopen(Filename.string(),
"wb");
}
LearnBlob(FeatureDefs, FeatureFile, Blob, denorm, BlobText,
}
void LearnBlob |
( |
const FEATURE_DEFS_STRUCT & |
FeatureDefs, |
|
|
FILE * |
File, |
|
|
TBLOB * |
Blob, |
|
|
const DENORM & |
denorm, |
|
|
const char * |
BlobText, |
|
|
const char * |
FontName |
|
) |
| |
Definition at line 102 of file blobclass.cpp.
{
cprintf(
"LearnBLob: CharDesc was NULL. Aborting.\n");
return;
}
fprintf(FeatureFile, "\n%s %s\n", FontName, BlobText);
} else {
tprintf(
"Blob learned was invalid!\n");
}
}