Создание исследовательского прототипа системы идентификации табличных данныхРефераты >> Программирование и компьютеры >> Создание исследовательского прототипа системы идентификации табличных данных
Errors[3][0]=char(234); Errors[3][1]=char(107);
Errors[4][0]=char(236); Errors[4][1]=char(109);
Errors[5][0]=char(229); Errors[5][1]=char(101);
Errors[6][0]=char(242); Errors[6][1]=char(116);
Errors[7][0]=char(238); Errors[7][1]=char(111);
Errors[8][0]=char(240); Errors[8][1]=char(112);
Errors[9][0]=char(245); Errors[9][1]=char(120);
Errors[10][0]=char(237); Errors[10][1]=char(104);
//Transcrypt
Control[0][0]=AnsiString("ght");Control[0][1]=AnsiString("ò");
Control[1][0]=AnsiString("ld");Control[1][1]=AnsiString("ëä");
Control[2][0]=AnsiString("e");Control[2][1]=AnsiString("å");
Control[3][0]=AnsiString("er");Control[3][1]=AnsiString("åð");
Complex[0][0]=AnsiString("tch");Complex[0][1]=AnsiString("÷");
Complex[1][0]=AnsiString("ch");Complex[1][1]=AnsiString("÷");
Complex[2][0]=AnsiString("zsh");Complex[2][1]=AnsiString("æ");
Complex[3][0]=AnsiString("sh");Complex[3][1]=AnsiString("ø");
Complex[4][0]=AnsiString("th");Complex[4][1]=AnsiString("ä");
Complex[5][0]=AnsiString("ou");Complex[5][1]=AnsiString("àó");
Complex[6][0]=AnsiString("ea");Complex[6][1]=AnsiString("è");
Complex[7][0]=AnsiString("ow");Complex[7][1]=AnsiString("àó");
Complex[8][0]=AnsiString("ee");Complex[8][1]=AnsiString("è");
Complex[9][0]=AnsiString("oo");Complex[9][1]=AnsiString("ó");
Complex[10][0]=AnsiString("ph");Complex[10][1]=AnsiString("ô");
Complex[11][0]=AnsiString("ui");Complex[11][1]=AnsiString("ó");
Complex[12][0]=AnsiString("aw");Complex[12][1]=AnsiString("î");
Sim[0][0]=AnsiString("a");Sim[0][1]=AnsiString("à");Sim[0][2]=AnsiString("ýé");
Sim[1][0]=AnsiString("e");Sim[1][1]=AnsiString("å");Sim[1][2]=AnsiString("è");
Sim[2][0]=AnsiString("i");Sim[2][1]=AnsiString("è");Sim[2][2]=AnsiString("àé");
Sim[3][0]=AnsiString("o");Sim[3][1]=AnsiString("î");Sim[3][2]=AnsiString("î");
Sim[4][0]=AnsiString("u");Sim[4][1]=AnsiString("à");Sim[4][2]=AnsiString("ó");
Sim[5][0]=AnsiString("y");Sim[5][1]=AnsiString("è");Sim[5][2]=AnsiString("");
Sim[6][0]=AnsiString("b");Sim[6][1]=AnsiString("á");Sim[6][2]=AnsiString();
Sim[7][0]=AnsiString("c");Sim[7][1]=AnsiString("ê");Sim[7][2]=AnsiString("ñ");
Sim[8][0]=AnsiString("g");Sim[8][1]=AnsiString("ã");Sim[8][2]=AnsiString("äæ");
Sim[9][0]=AnsiString("k");Sim[9][1]=AnsiString("ê");Sim[9][2]=AnsiString("ê");
Sim[10][0]=AnsiString("l");Sim[10][1]=AnsiString("ë");Sim[10][2]=AnsiString("ë");
Sim[11][0]=AnsiString("q");Sim[11][1]=AnsiString("êâ");Sim[11][2]=AnsiString("êó");
Sim[12][0]=AnsiString("t");Sim[12][1]=AnsiString("ò");Sim[12][2]=AnsiString();
Sim[13][0]=AnsiString("d");Sim[13][1]=AnsiString("ä");Sim[13][2]=AnsiString();
Sim[14][0]=AnsiString("f");Sim[14][1]=AnsiString("ô");Sim[14][2]=AnsiString();
Sim[15][0]=AnsiString("h");Sim[15][1]=AnsiString("õ");Sim[15][2]=AnsiString();
Sim[16][0]=AnsiString("j");Sim[16][1]=AnsiString("äæ");Sim[16][2]=AnsiString();
Sim[17][0]=AnsiString("m");Sim[17][1]=AnsiString("ì");Sim[17][2]=AnsiString();
Sim[18][0]=AnsiString("n");Sim[18][1]=AnsiString("í");Sim[18][2]=AnsiString();
Sim[19][0]=AnsiString("p");Sim[19][1]=AnsiString("ï");Sim[19][2]=AnsiString();
Sim[20][0]=AnsiString("r");Sim[20][1]=AnsiString("ð");Sim[20][2]=AnsiString();
Sim[21][0]=AnsiString("s");Sim[21][1]=AnsiString("ñ");Sim[21][2]=AnsiString("ç");
Sim[22][0]=AnsiString("v");Sim[22][1]=AnsiString("â");Sim[22][2]=AnsiString();
Sim[23][0]=AnsiString("w");Sim[23][1]=AnsiString("â");Sim[23][2]=AnsiString("ó");
Sim[24][0]=AnsiString("x");Sim[24][1]=AnsiString("êñ");Sim[24][2]=AnsiString();
Sim[25][0]=AnsiString("z");Sim[25][1]=AnsiString("ç");Sim[25][2]=AnsiString();
}
TSettings::~TSettings(){}
void TPositions::SaveTo(FILE *f){
TStringList *SL=new TStringList();
for(int fl=0;fl<FlowNum;fl++){
SL->Add(ABC[fl]);
for(int i=0;i<WordsNum;i++)
SL->Add(Words[i][fl]);
for(int i=0;i<NumbersNum;i++){
SL->Add(StrNumbers[i][fl]);
SL->Add(Numbers[i][fl]);
}
fputs(SL->CommaText.c_str(),f);
fputs("\n",f);
SL->Clear();
}
delete SL;
}
void TPositions::LoadFrom(FILE *f){
TStringList *SL=new TStringList();
char str[600];
for(int fl=0;fl<FlowNum;fl++){
fgets(str,600,f);
SL->CommaText=AnsiString(str);
ABC[fl]=SL->Strings[0];
for(int i=0;i<WordsNum;i++){
Words[i][fl]=SL->Strings[i+1];
if(!Words[i][fl].IsEmpty())
WC[fl]++;
}
for(int i=0;i<NumbersNum;i++){
StrNumbers[i][fl]=SL->Strings[2*i+WordsNum+1];
Numbers[i][fl]=SL->Strings[2*i+2+WordsNum].ToDouble();
if(Numbers[i][fl]!=0)
NC[fl]++;
}
SL->Clear();
if(NC[fl]+WC[fl])
FlowCount++;
}
delete SL;
}
AnsiString TPositions::Replace(AnsiString SourceString,AnsiString Replacer,AnsiString Displacer)
{ SourceString.Insert(Replacer,LastIn(SourceString,Displacer));
SourceString.Delete(LastIn(SourceString,Displacer),Displacer.Length());
return(SourceString);
}
int TPositions::LastIn(AnsiString SourceString,AnsiString SubStr)
{int k=0;
while (SourceString.AnsiPos(SubStr))
{k=SourceString.AnsiPos(SubStr);
SourceString.Insert(AnsiString("_"),k);
SourceString.Delete(k+1,1);
}
return(k);
}
AnsiString TPositions::TransCrypt(AnsiString LatString)
{ AnsiString CheckString;
int Opened=0,s=0;