| 1 |
/* |
| 2 |
Copyright (c) 1993-2008, Cognitive Technologies |
| 3 |
All rights reserved. |
| 4 |
|
| 5 |
пЮГПЕЬЮЕРЯЪ ОНБРНПМНЕ ПЮЯОПНЯРПЮМЕМХЕ Х ХЯОНКЭГНБЮМХЕ ЙЮЙ Б БХДЕ ХЯУНДМНЦН ЙНДЮ, |
| 6 |
РЮЙ Х Б ДБНХВМНИ ТНПЛЕ, Я ХГЛЕМЕМХЪЛХ ХКХ АЕГ, ОПХ ЯНАКЧДЕМХХ ЯКЕДСЧЫХУ СЯКНБХИ: |
| 7 |
|
| 8 |
* оПХ ОНБРНПМНЛ ПЮЯОПНЯРПЮМЕМХХ ХЯУНДМНЦН ЙНДЮ ДНКФМШ НЯРЮБЮРЭЯЪ СЙЮГЮММНЕ |
| 9 |
БШЬЕ СБЕДНЛКЕМХЕ НА ЮБРНПЯЙНЛ ОПЮБЕ, ЩРНР ЯОХЯНЙ СЯКНБХИ Х ОНЯКЕДСЧЫХИ |
| 10 |
НРЙЮГ НР ЦЮПЮМРХИ. |
| 11 |
* оПХ ОНБРНПМНЛ ПЮЯОПНЯРПЮМЕМХХ ДБНХВМНЦН ЙНДЮ Б ДНЙСЛЕМРЮЖХХ Х/ХКХ Б |
| 12 |
ДПСЦХУ ЛЮРЕПХЮКЮУ, ОНЯРЮБКЪЕЛШУ ОПХ ПЮЯОПНЯРПЮМЕМХХ, ДНКФМШ ЯНУПЮМЪРЭЯЪ |
| 13 |
СЙЮГЮММЮЪ БШЬЕ ХМТНПЛЮЖХЪ НА ЮБРНПЯЙНЛ ОПЮБЕ, ЩРНР ЯОХЯНЙ СЯКНБХИ Х |
| 14 |
ОНЯКЕДСЧЫХИ НРЙЮГ НР ЦЮПЮМРХИ. |
| 15 |
* мХ МЮГБЮМХЕ Cognitive Technologies, МХ ХЛЕМЮ ЕЕ ЯНРПСДМХЙНБ МЕ ЛНЦСР |
| 16 |
АШРЭ ХЯОНКЭГНБЮМШ Б ЙЮВЕЯРБЕ ЯПЕДЯРБЮ ОНДДЕПФЙХ Х/ХКХ ОПНДБХФЕМХЪ |
| 17 |
ОПНДСЙРНБ, НЯМНБЮММШУ МЮ ЩРНЛ он, АЕГ ОПЕДБЮПХРЕКЭМНЦН ОХЯЭЛЕММНЦН |
| 18 |
ПЮГПЕЬЕМХЪ. |
| 19 |
|
| 20 |
щрю опнцпюллю опеднярюбкемю бкюдекэжюлх юбрнпяйху опюб х/хкх дпсцхлх кхжюлх "йюй |
| 21 |
нмю еярэ" аег йюйнцн-кхан бхдю цюпюмрхи, бшпюфеммшу ъбмн хкх ондпюгслебюелшу, |
| 22 |
бйкчвюъ цюпюмрхх йнллепвеяйни жеммнярх х опхцндмнярх дкъ йнмйпермни жекх, мн ме |
| 23 |
нцпюмхвхбюъяэ хлх. мх бкюдекеж юбрнпяйху опюб х мх ндмн дпсцне кхжн, йнрнпне |
| 24 |
лнфер хглемърэ х/хкх онбрнпмн пюяопнярпюмърэ опнцпюллс, мх б йнел яксвюе ме |
| 25 |
мея╗р нрберярбеммнярх, бйкчвюъ кчаше наыхе, яксвюимше, яоежхюкэмше хкх |
| 26 |
онякеднбюбьхе сашрйх, ябъгюммше я хяонкэгнбюмхел хкх онмеяеммше бякедярбхе |
| 27 |
мебнглнфмнярх хяонкэгнбюмхъ опнцпюллш (бйкчвюъ онрепх дюммшу, хкх дюммше, |
| 28 |
ярюбьхе мецндмшлх, хкх сашрйх х/хкх онрепх днунднб, онмеяеммше хг-гю деиярбхи |
| 29 |
рперэху кхж х/хкх нрйюгю опнцпюллш пюанрюрэ янблеярмн я дпсцхлх опнцпюллюлх, |
| 30 |
мн ме нцпюмхвхбюъяэ щрхлх яксвюълх), мн ме нцпюмхвхбюъяэ хлх, дюфе еякх рюйни |
| 31 |
бкюдекеж хкх дпсцне кхжн ашкх хгбеыемш н бнглнфмнярх рюйху сашрйнб х онрепэ. |
| 32 |
|
| 33 |
Redistribution and use in source and binary forms, with or without modification, |
| 34 |
are permitted provided that the following conditions are met: |
| 35 |
|
| 36 |
* Redistributions of source code must retain the above copyright notice, |
| 37 |
this list of conditions and the following disclaimer. |
| 38 |
* Redistributions in binary form must reproduce the above copyright notice, |
| 39 |
this list of conditions and the following disclaimer in the documentation |
| 40 |
and/or other materials provided with the distribution. |
| 41 |
* Neither the name of the Cognitive Technologies nor the names of its |
| 42 |
contributors may be used to endorse or promote products derived from this |
| 43 |
software without specific prior written permission. |
| 44 |
|
| 45 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 46 |
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 47 |
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 48 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE |
| 49 |
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 50 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 51 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 52 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 53 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 54 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 55 |
*/ |
| 56 |
|
| 57 |
/*----------------------------------------------------------------------*/ |
| 58 |
/* STICK.H 10.01.1994 */ |
| 59 |
/*----------------------------------------------------------------------*/ |
| 60 |
// 02.11.1992 3,350 old OLEG Version |
| 61 |
// 21.01.1993 Begin of MK Work: |
| 62 |
// OLD: T_config, Y_config; |
| 63 |
// NEW: T_hor, T_2, T_3, T_skok; |
| 64 |
// 08.02.1993 signums->base_3 |
| 65 |
// 17.02.1993 T_skok => T_skok_L, T_skok_R |
| 66 |
// 01.06.1993 SIGNUMS: lll_nose_1 (FLAT VERT part of NOSE >= 3) |
| 67 |
// 01.06.1993 SIGNUMS: inc_v16; |
| 68 |
// 05.08.1993 add for up_dot; |
| 69 |
// 26.08.1993 to FARA 7.3 |
| 70 |
// 26.08.1993 DELETE up_dot_NAVIS; |
| 71 |
// 26.08.1993 to FARA 7.4 |
| 72 |
// 15.11.1993 add .num to struct INC_BASE; |
| 73 |
// 19.11.1993 VERS-085; |
| 74 |
// 10.12.1993 OLD uchar inc_v16 => char inc_num; |
| 75 |
// VERS-087; |
| 76 |
// 15.12.1993 xxx_OxBA => xxx_0xBA (LETTER => DIGIT); |
| 77 |
// 16.12.1993 VERS-088; |
| 78 |
// 03.01.1994 begin work wist base_2mk, base_3mk, base_4mk; |
| 79 |
// 06.01.1994 l,r->max_flag; |
| 80 |
// 07.01.1994 s->full_width; s->left_mode, s->right_mode; |
| 81 |
// 09.01.1994 s->t_TOP (t^ or t~); |
| 82 |
// 10.01.1993 VERS-089; |
| 83 |
/*----------------------------------------------------------------------*/ |
| 84 |
/* |
| 85 |
шшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшш |
| 86 |
шш шш |
| 87 |
шш Copyright (C) 1990 Cognitive Technology Corporation. шш |
| 88 |
шш All rights reserved. This program is proprietary and шш |
| 89 |
шш a trade secret of Cognitive Technology Corporation. шш |
| 90 |
шш шш |
| 91 |
шшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшшш |
| 92 |
*/ |
| 93 |
|
| 94 |
#ifndef D_STICK_TYPES |
| 95 |
#define D_STICK_TYPES |
| 96 |
/*----------------------------------------------------------------------*/ |
| 97 |
typedef struct { int16_t row, /* row in c_comp */ |
| 98 |
col, /* column * 2 */ |
| 99 |
len; /* length */ |
| 100 |
} center_interval; |
| 101 |
/*----------------------------------------------------------------------*/ |
| 102 |
typedef struct // l->xxx, r->xxx; |
| 103 |
{ |
| 104 |
uchar |
| 105 |
mount[5], /* max flag in any zone. 0 - no flag */ |
| 106 |
conc[5], /* max concave in any zone. 0 - no concave */ |
| 107 |
m_pos[5], /* position of max flag in zone. 0-if no flag */ |
| 108 |
c_pos[5], /* --//-- for concaves */ |
| 109 |
mb_pos[5], /* first position flag. 0 if no flag */ |
| 110 |
me_pos[5], /* last position flag. . 0 if no flag */ |
| 111 |
cb_pos[5], /* first position conc. 0 if no conc */ |
| 112 |
ce_pos[5], /* last position conc. 0 if no conc */ |
| 113 |
m_meandr, /* sum of near pimples (long=1) */ |
| 114 |
c_meandr, /* sum of near concaves (long=1) */ |
| 115 |
up_serif, /* sign of serif : */ |
| 116 |
down_serif, /* 0 - not exist, 1 - small, 2 - long */ |
| 117 |
up_hook, /* sign of hook : */ |
| 118 |
down_hook, /* 0 - no, 1 - yes */ |
| 119 |
num_flags, /* num of flags */ |
| 120 |
num_long_flags, /* num of long flags */ |
| 121 |
num_concs, /* num of concaves */ |
| 122 |
max_flag, /* 06.01.1994 */ |
| 123 |
main_ear; /* NOT USED in this version */ |
| 124 |
} STICK_CHARS; /* left or right characteristics of stick */ |
| 125 |
/*----------------------------------------------------------------------*/ |
| 126 |
typedef struct // s->xxx; |
| 127 |
{ |
| 128 |
int16_t height, // height of c_comp |
| 129 |
width , // width of c_comp |
| 130 |
base_2, // second base line |
| 131 |
base_3, // third base line |
| 132 |
base_2mk, // MK EDITION of SECOND, |
| 133 |
base_3mk, // THIRD, |
| 134 |
base_4mk; // and FOURTH base lines 03.01.1994 |
| 135 |
uchar |
| 136 |
l_f_symptom, // special signums for letter 'f' |
| 137 |
r_f_symptom, // l:0,1,2,3 ; r : 0,1,2 |
| 138 |
t_TOP, // t^ or t~; |
| 139 |
dis_nose_1, // diskrim 1 for his flat nose |
| 140 |
typ_nose_1, // type 1-nose : 0(flat),1(long) |
| 141 |
lll_nose_1, // MK: FLAT VERT part of NOSE >= 3 |
| 142 |
dis_slash, // diskrim letter '/' |
| 143 |
dis_left_brace, dis_right_brace, // dis '(',')' |
| 144 |
////// dis_OxBA, // diskrim ╨ for his head |
| 145 |
dis_0xBA, // diskrim ╨ for his head |
| 146 |
neck, // sign neck overlay base line 2 |
| 147 |
T_config, // similar 'T' (for Y-diskrim) |
| 148 |
////// Y_config, // similar 'Y' (for T-diskrim) |
| 149 |
//////////// T_hor, // MK: about hor. difference |
| 150 |
T_2, // MK: num of 2 intervals |
| 151 |
T_3, // MK: num of 3 intervals |
| 152 |
////// T_skok, // MK: about max skok of abris |
| 153 |
T_skok_L, // MK: about max skok of abris |
| 154 |
T_skok_R, // MK: about max skok of abris |
| 155 |
stick_width, // optimal wide of stick |
| 156 |
left_mode, |
| 157 |
right_mode, |
| 158 |
full_width, // l->max_flag + s->stick_width + r->max_flag; |
| 159 |
inc, // 1-inc,0-no inc |
| 160 |
////// inc_v16, // inc_v/16 03.06.1993 (see inc) => inc_num; |
| 161 |
cut_l,cut_r, // cutting signums |
| 162 |
dis_up_dot, // diskrim for ij-dot |
| 163 |
////// up_dot_NAVIS, // Priznak NAVISANIE (NO DOT) |
| 164 |
up_dot_H, // Hight of DOT (0 - NO DOT !) |
| 165 |
down_nose_1, // special for 1 : nose belong central zone |
| 166 |
up_dot_W; // Width of DOT |
| 167 |
char |
| 168 |
inc_num, // 10.12.1993 (from inc_num_EEM) |
| 169 |
up_dot_dCOL; // Displacement of DOT (use col) |
| 170 |
uchar num_lines; /* Number of with none single interval */ |
| 171 |
int16_t incline; /* Normal tg(stick)*2048 + line_incline */ |
| 172 |
} STICK_SIGNUMS; // auxiliary information for |
| 173 |
// stick diskrimination |
| 174 |
/*----------------------------------------------------------------------*/ |
| 175 |
typedef struct |
| 176 |
{ |
| 177 |
int16_t tg; /* tg = tangens*2048 */ |
| 178 |
int16_t num; /* 15.11.1993 MK NEW */ |
| 179 |
int16_t inc[128]; /* table of inc */ |
| 180 |
} INC_BASE; /* base tables of inc */ |
| 181 |
/*----------------------------------------------------------------------*/ |
| 182 |
#define ADD_PROB(c) (c->nvers ? (c->vers[0].prob - 4) : 254 ) |
| 183 |
|
| 184 |
#endif |
| 185 |
/*----------------------------------------------------------------------*/ |