source: app/src/cor/corr.hh @ b5884b3

Last change on this file since b5884b3 was 25ae32e, checked in by obrebski <obrebski@…>, 17 years ago

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@4 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

  • Property mode set to 100644
File size: 955 bytes
Line 
1//---------------------------------------------------------------------------
2#ifndef _corr_hh
3#define _corr_hh
4//---------------------------------------------------------------------------
5
6#include "../lib/tfti.h"
7#include "../lib/word.h"
8
9class Corr : public TFTiv<char,char>
10{
11private:
12  int H[100][100];
13  char X[100];                         // misspelled string
14  char Y[100];                         // (possibly partial) candidate string
15  int m;                               // length of X
16  int n;                               // maximal length of Y
17
18  int ed(int,int);
19  int cuted(int);
20  void recomputeH(int);
21
22public:
23  int (*H2)[100];
24
25  int t;                               // threshold
26
27  Corr() : H2((int(*)[100])&H[2][2]) {};
28  Corr(const char* a) : TFTiv<char,char>(a), H2((int(*)[100])&H[2][2]) { };
29
30  int correct(const char* w, Words& tab);
31};
32
33//---------------------------------------------------------------------------
34#endif
Note: See TracBrowser for help on using the repository browser.