Back to index

lightning-sunbird  0.9+nobinonly
myspell.hxx
Go to the documentation of this file.
00001 #ifndef _MYSPELLMGR_HXX_
00002 #define _MYSPELLMGR_HXX_
00003 
00004 #include "hashmgr.hxx"
00005 #include "affixmgr.hxx"
00006 #include "suggestmgr.hxx"
00007 #include "csutil.hxx"
00008 
00009 #define NOCAP   0
00010 #define INITCAP 1
00011 #define ALLCAP  2
00012 #define HUHCAP  3
00013 
00014 class MySpell
00015 {
00016   AffixMgr*       pAMgr;
00017   HashMgr*        pHMgr;
00018   SuggestMgr*     pSMgr;
00019   char *          encoding;
00020   struct cs_info * csconv;
00021   int             maxSug;
00022 
00023 public:
00024   MySpell(const char * affpath, const char * dpath);
00025   ~MySpell();
00026 
00027   int suggest(char*** slst, const char * word);
00028   int spell(const char *);
00029   char * get_dic_encoding();
00030 
00031 private:
00032    int    cleanword(char *, const char *, int *, int *);
00033    char * check(const char *);
00034 };
00035 
00036 #endif