Last change
on this file since abd28d1 was
5f4d9c3,
checked in by Maciej Prill <mprill@…>, 13 years ago
|
Rewritten the build system, added lem UTF-8 version.
|
-
Property mode set to
100644
|
File size:
955 bytes
|
Rev | Line | |
---|
[5f4d9c3] | 1 | //--------------------------------------------------------------------------- |
---|
| 2 | #ifndef _corr_hh |
---|
| 3 | #define _corr_hh |
---|
| 4 | //--------------------------------------------------------------------------- |
---|
| 5 | |
---|
| 6 | #include "../lib/tfti.h" |
---|
| 7 | #include "../lib/word.h" |
---|
| 8 | |
---|
| 9 | class Corr : public TFTiv<char,char> |
---|
| 10 | { |
---|
| 11 | private: |
---|
| 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 | |
---|
| 22 | public: |
---|
| 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.