2007-03-08 04:03:40 +08:00
|
|
|
/******************************************************************************
|
2018-07-01 00:28:24 +08:00
|
|
|
** Filename: adaptive.h
|
|
|
|
** Purpose: Interface to adaptive matcher.
|
|
|
|
** Author: Dan Johnson
|
2007-03-08 04:03:40 +08:00
|
|
|
**
|
2018-07-01 00:28:24 +08:00
|
|
|
** (c) Copyright Hewlett-Packard Company, 1988.
|
2007-03-08 04:03:40 +08:00
|
|
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
** you may not use this file except in compliance with the License.
|
|
|
|
** You may obtain a copy of the License at
|
|
|
|
** http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
** Unless required by applicable law or agreed to in writing, software
|
|
|
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
** See the License for the specific language governing permissions and
|
|
|
|
** limitations under the License.
|
|
|
|
******************************************************************************/
|
|
|
|
#ifndef ADAPTIVE_H
|
|
|
|
#define ADAPTIVE_H
|
|
|
|
|
2010-07-31 06:46:32 +08:00
|
|
|
/*----------------------------------------------------------------------------
|
2007-03-08 04:03:40 +08:00
|
|
|
Include Files and Type Defines
|
2010-07-31 06:46:32 +08:00
|
|
|
----------------------------------------------------------------------------*/
|
2018-05-20 05:52:04 +08:00
|
|
|
#include <cstdio>
|
2019-04-04 02:25:48 +08:00
|
|
|
#include "intproto.h"
|
|
|
|
#include "oldlist.h"
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
typedef struct {
|
Use POSIX data types and macros (#878)
* api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* cutil: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* training: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract data types by POSIX data types
Now all Tesseract data types which are no longer needed can be removed
from ccutil/host.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* lstm: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Remove the macros which are now unused from ccutil/host.h.
Remove also the obsolete history comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix build error caused by ambiguous ClipToRange
Error message vom Appveyor CI:
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2672: 'ClipToRange': no matching overloaded function found [C:\projects\tesseract\build\libtesseract.vcxproj]
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2782: 'T ClipToRange(const T &,const T &,const T &)': template parameter 'T' is ambiguous [C:\projects\tesseract\build\libtesseract.vcxproj]
c:\projects\tesseract\ccutil\helpers.h(122): note: see declaration of 'ClipToRange'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: could be 'char'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: or 'int'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* unittest: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* arch: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-14 04:36:30 +08:00
|
|
|
uint16_t ProtoId;
|
2007-03-08 04:03:40 +08:00
|
|
|
PROTO_STRUCT Proto;
|
|
|
|
}
|
|
|
|
|
|
|
|
TEMP_PROTO_STRUCT;
|
2019-04-04 02:25:48 +08:00
|
|
|
using TEMP_PROTO = TEMP_PROTO_STRUCT*;
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
typedef struct {
|
Use POSIX data types and macros (#878)
* api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* cutil: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* training: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract data types by POSIX data types
Now all Tesseract data types which are no longer needed can be removed
from ccutil/host.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* lstm: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Remove the macros which are now unused from ccutil/host.h.
Remove also the obsolete history comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix build error caused by ambiguous ClipToRange
Error message vom Appveyor CI:
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2672: 'ClipToRange': no matching overloaded function found [C:\projects\tesseract\build\libtesseract.vcxproj]
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2782: 'T ClipToRange(const T &,const T &,const T &)': template parameter 'T' is ambiguous [C:\projects\tesseract\build\libtesseract.vcxproj]
c:\projects\tesseract\ccutil\helpers.h(122): note: see declaration of 'ClipToRange'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: could be 'char'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: or 'int'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* unittest: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* arch: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-14 04:36:30 +08:00
|
|
|
uint8_t NumTimesSeen;
|
|
|
|
uint8_t ProtoVectorSize;
|
2007-03-08 04:03:40 +08:00
|
|
|
PROTO_ID MaxProtoId;
|
|
|
|
BIT_VECTOR Protos;
|
2011-03-22 05:45:36 +08:00
|
|
|
int FontinfoId; // font information inferred from pre-trained templates
|
2007-03-08 04:03:40 +08:00
|
|
|
} TEMP_CONFIG_STRUCT;
|
2019-04-04 02:25:48 +08:00
|
|
|
using TEMP_CONFIG = TEMP_CONFIG_STRUCT*;
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
typedef struct {
|
|
|
|
UNICHAR_ID* Ambigs;
|
2011-03-22 05:45:36 +08:00
|
|
|
int FontinfoId; // font information inferred from pre-trained templates
|
|
|
|
} PERM_CONFIG_STRUCT;
|
2019-04-04 02:25:48 +08:00
|
|
|
using PERM_CONFIG = PERM_CONFIG_STRUCT*;
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
typedef union {
|
2007-03-08 04:03:40 +08:00
|
|
|
TEMP_CONFIG Temp;
|
|
|
|
PERM_CONFIG Perm;
|
|
|
|
} ADAPTED_CONFIG;
|
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
typedef struct {
|
Use POSIX data types and macros (#878)
* api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* cutil: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* training: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract data types by POSIX data types
Now all Tesseract data types which are no longer needed can be removed
from ccutil/host.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* lstm: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Remove the macros which are now unused from ccutil/host.h.
Remove also the obsolete history comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix build error caused by ambiguous ClipToRange
Error message vom Appveyor CI:
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2672: 'ClipToRange': no matching overloaded function found [C:\projects\tesseract\build\libtesseract.vcxproj]
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2782: 'T ClipToRange(const T &,const T &,const T &)': template parameter 'T' is ambiguous [C:\projects\tesseract\build\libtesseract.vcxproj]
c:\projects\tesseract\ccutil\helpers.h(122): note: see declaration of 'ClipToRange'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: could be 'char'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: or 'int'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* unittest: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* arch: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-14 04:36:30 +08:00
|
|
|
uint8_t NumPermConfigs;
|
|
|
|
uint8_t MaxNumTimesSeen; // maximum number of times any TEMP_CONFIG was seen
|
2019-09-14 23:02:50 +08:00
|
|
|
// (cut at matcher_min_examples_for_prototyping)
|
2007-03-08 04:03:40 +08:00
|
|
|
BIT_VECTOR PermProtos;
|
|
|
|
BIT_VECTOR PermConfigs;
|
|
|
|
LIST TempProtos;
|
|
|
|
ADAPTED_CONFIG Config[MAX_NUM_CONFIGS];
|
|
|
|
} ADAPT_CLASS_STRUCT;
|
2019-04-04 02:25:48 +08:00
|
|
|
using ADAPT_CLASS = ADAPT_CLASS_STRUCT*;
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
typedef struct {
|
2007-03-08 04:03:40 +08:00
|
|
|
INT_TEMPLATES Templates;
|
2009-07-11 10:17:36 +08:00
|
|
|
int NumNonEmptyClasses;
|
Use POSIX data types and macros (#878)
* api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* cutil: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* training: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract data types by POSIX data types
Now all Tesseract data types which are no longer needed can be removed
from ccutil/host.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* lstm: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Remove the macros which are now unused from ccutil/host.h.
Remove also the obsolete history comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix build error caused by ambiguous ClipToRange
Error message vom Appveyor CI:
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2672: 'ClipToRange': no matching overloaded function found [C:\projects\tesseract\build\libtesseract.vcxproj]
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2782: 'T ClipToRange(const T &,const T &,const T &)': template parameter 'T' is ambiguous [C:\projects\tesseract\build\libtesseract.vcxproj]
c:\projects\tesseract\ccutil\helpers.h(122): note: see declaration of 'ClipToRange'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: could be 'char'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: or 'int'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* unittest: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* arch: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-14 04:36:30 +08:00
|
|
|
uint8_t NumPermClasses;
|
2007-03-08 04:03:40 +08:00
|
|
|
ADAPT_CLASS Class[MAX_NUM_CLASSES];
|
|
|
|
} ADAPT_TEMPLATES_STRUCT;
|
2019-04-04 02:25:48 +08:00
|
|
|
using ADAPT_TEMPLATES = ADAPT_TEMPLATES_STRUCT*;
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2010-07-31 06:46:32 +08:00
|
|
|
/*----------------------------------------------------------------------------
|
2007-03-08 04:03:40 +08:00
|
|
|
Public Function Prototypes
|
2010-07-31 06:46:32 +08:00
|
|
|
----------------------------------------------------------------------------*/
|
2009-07-11 10:17:36 +08:00
|
|
|
#define NumNonEmptyClassesIn(Template) ((Template)->NumNonEmptyClasses)
|
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
#define IsEmptyAdaptedClass(Class) \
|
|
|
|
((Class)->NumPermConfigs == 0 && (Class)->TempProtos == NIL_LIST)
|
2009-07-11 10:17:36 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
#define ConfigIsPermanent(Class, ConfigId) \
|
|
|
|
(test_bit((Class)->PermConfigs, ConfigId))
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
#define MakeConfigPermanent(Class, ConfigId) \
|
|
|
|
(SET_BIT((Class)->PermConfigs, ConfigId))
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
#define MakeProtoPermanent(Class, ProtoId) \
|
|
|
|
(SET_BIT((Class)->PermProtos, ProtoId))
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
#define TempConfigFor(Class, ConfigId) ((Class)->Config[ConfigId].Temp)
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
#define PermConfigFor(Class, ConfigId) ((Class)->Config[ConfigId].Perm)
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
#define IncreaseConfidence(TempConfig) ((TempConfig)->NumTimesSeen++)
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
void AddAdaptedClass(ADAPT_TEMPLATES Templates, ADAPT_CLASS Class,
|
|
|
|
CLASS_ID ClassId);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
void FreeTempProto(void* arg);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2007-07-18 09:15:07 +08:00
|
|
|
void FreeTempConfig(TEMP_CONFIG Config);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2007-07-18 09:15:07 +08:00
|
|
|
ADAPT_CLASS NewAdaptedClass();
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2007-07-18 09:15:07 +08:00
|
|
|
void free_adapted_class(ADAPT_CLASS adapt_class);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2007-07-18 09:15:07 +08:00
|
|
|
void free_adapted_templates(ADAPT_TEMPLATES templates);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2011-03-22 05:45:36 +08:00
|
|
|
TEMP_CONFIG NewTempConfig(int MaxProtoId, int FontinfoId);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2007-07-18 09:15:07 +08:00
|
|
|
TEMP_PROTO NewTempProto();
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
ADAPT_CLASS ReadAdaptedClass(tesseract::TFile* File);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
PERM_CONFIG ReadPermConfig(tesseract::TFile* File);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
TEMP_CONFIG ReadTempConfig(tesseract::TFile* File);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
void WriteAdaptedClass(FILE* File, ADAPT_CLASS Class, int NumConfigs);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
void WritePermConfig(FILE* File, PERM_CONFIG Config);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2019-04-04 02:25:48 +08:00
|
|
|
void WriteTempConfig(FILE* File, TEMP_CONFIG Config);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
|
|
|
#endif
|