#include "../lib/tfti.h"
#include "../lib/word.h"
#include "../lib/symtab.h"
#include "../lib/const.h"

class Lem {

 protected:
  //  Alphabet& _alpha;

  // slownik
  TFTiv<char,char> _dict;

  void add_to_table(Words& tab, const char* f, long s);

 public:

  Lem() {};
  Lem(const char* d)
    : _dict(d) {};
  virtual int ana(const char* form, Words& tab);
  int pref(char* form, Words& tab);
  void prn_dict();

};


class AuxLem : public Lem {
public:

  static const int SIZE=1500000;
  //  static const int MAXLINE=1000;
  static const int MAXALT=256;

  AuxLem(const char* filename);
  ~AuxLem();

//  int ana(const char* form, Grams& tab);
  int ana(const char* form, Words& tab);

//  operator bool() { return _dict && info; }

private:
  SymbolTable _dict;
  char* info[SIZE];

};



