Last change
on this file since 18e1952 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:
996 bytes
|
Line | |
---|
1 | // Do wyrzucenia. Korzystamy z LemFST.h teraz#include "../lib/tfti.h" |
---|
2 | #include "lemfst.h" |
---|
3 | #include "../lib/word.h" |
---|
4 | #include "../lib/symtab.h" |
---|
5 | #include "../lib/const.h" |
---|
6 | |
---|
7 | class Lem { |
---|
8 | |
---|
9 | protected: |
---|
10 | // Alphabet& _alpha; |
---|
11 | |
---|
12 | // slownik |
---|
13 | //TFTiv<char,char> _dict; |
---|
14 | LemFST _dict; |
---|
15 | void add_to_table(Words& tab, const wchar_t* f, LemFST::State s); |
---|
16 | |
---|
17 | public: |
---|
18 | |
---|
19 | //Lem(// {} |
---|
20 | Lem(const char* d) : _dict(d) {} // TODO: Dodaj konstruktor z sciezka do FST.bin |
---|
21 | virtual int ana(const wchar_t* form, Words& tab); |
---|
22 | //int pref(char* form, Words& tab); |
---|
23 | void prn_dict(); |
---|
24 | |
---|
25 | }; |
---|
26 | |
---|
27 | |
---|
28 | class AuxLem : public Lem { |
---|
29 | public: |
---|
30 | |
---|
31 | static const int SIZE=1500000; |
---|
32 | // static const int MAXLINE=1000; |
---|
33 | static const int MAXALT=256; |
---|
34 | |
---|
35 | AuxLem(const char* filename); |
---|
36 | ~AuxLem(); |
---|
37 | |
---|
38 | // int ana(const char* form, Grams& tab); |
---|
39 | int ana(const char* form, Words& tab); |
---|
40 | |
---|
41 | // operator bool() { return _dict && info; } |
---|
42 | |
---|
43 | private: |
---|
44 | UTT::SymbolTable _dict; |
---|
45 | char* info[SIZE]; |
---|
46 | |
---|
47 | }; |
---|
48 | |
---|
49 | |
---|
50 | |
---|
Note: See
TracBrowser
for help on using the repository browser.