2 * Copyright (C) 2004 Jesus Gimenez, Lluis Marquez and Senen Moya
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 simpleList
<infoDict
*> maybe
;
45 dictionary(const std::string
& name
, const std::string
& backup
);
46 dictionary(const std::string
& name
);
47 dictionary(const std::string
& name
,int limInf
, int limSup
);
50 void dictAddBackup(const std::string
& name
);
51 void addBackupEntry(const std::string
& token
, const std::set
<std::string
>& tags
);
53 dataDict
* getElement(const std::string
& key
);
54 std::string
& getElementWord(dataDict
* ptr
);
55 int getElementNumWord(dataDict
* ptr
);
56 int getElementNumMaybe(dataDict
* ptr
);
57 simpleList
<infoDict
*>& getElementMaybe(dataDict
* ptr
);
58 infoDict
* getMFT(dataDict
* w
);
59 std::string
getAmbiguityClass(dataDict
* w
);
61 hash_t
<infoDict
*>* dictFindAmbP(int *numPOS
);
62 hash_t
<infoDict
*>* dictFindUnkP(int *numPOS
);
63 void dictRepairFromFile(const std::string
& fileName
);
64 void dictRepairHeuristic(float dratio
);
66 void dictCleanListInfoDict(simpleList
< infoDict
* >* l
, int num
);
68 void dictWrite(const std::string
& outName
);
71 void dictLoad(FILE *in
);
72 void dictCreate(FILE *f
,int offset
, int limit
);
73 void dictIncInfo(dataDict
*elem
, const std::string
& pos
);
75 int readInt(FILE *in
);
76 infoDict
*readData(FILE *in
);