Setting the User Dictionary
Set the User Dictionary to be included in the engine. Only one User Dictionary can be set per instance of the dictionary class.
int msetuserdict(char* dbfname);
Input
char* dbfname; User dictionary path name excluding the extension
Return value
0.................Normal termination
BUFFER_OVERFLOW...The number of built-in dictionaries exceeds JOCRMAXDICT
※To reinitialize, delete the instance and reconstruct it again.
Example
#include "ocrdef.h"
#include "ocrco.h"
#include "cjocrstock.h"
#include "cjocrdict98.h"
#include "errcode.h"
...
....
CJocrDict* pjocrdict = new CJocrDict;
pjocrdict->msetsystemdict("c:\\dic\\feature\\system");
pjocrdict->msetsystemdict("c:\\dic\\feature\\systemfat");
pjocrdict->msetuserdict("c:\\dic\\feature\\user");
int ret = pjocrdict->mloaddict();
if(ret == 0) {
printf("Dictionary loaded successfully");
}
else {
printf("Dictionary load error");
}
delete pjocrdict;