~ubuntu-branches/ubuntu/quantal/sunpinyin/quantal

« back to all changes in this revision

Viewing changes to src/ime-core/ic_history.h

  • Committer: Bazaar Package Importer
  • Author(s): Liang Guo
  • Date: 2011-03-15 00:20:57 UTC
  • mfrom: (1.1.2 upstream) (1.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110315002057-k8qf3ybnqtuaf0u1
Tags: 2.0.3-2
* Build with prefix=$(DEB_DESTDIR)/usr (Close: #617752)
* Fix FTBFS on SH (Close: #617753)
* Fix FTBFS on MIPSEL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
    */
104
104
    virtual bool
105
105
    loadFromBuffer(void* buf_ptr, size_t sz) = 0;
 
106
 
 
107
    virtual void
 
108
    addStopWords(const std::set<unsigned int>& stopWords) = 0;
 
109
 
 
110
    virtual void
 
111
    initStopWords() = 0;
106
112
};
107
113
 
108
114
class CBigramHistory : public CICHistory {
147
153
    bool
148
154
    saveToFile (const char *fname = NULL);
149
155
 
 
156
    virtual void addStopWords (const std::set<unsigned int>& stopWords);
 
157
    virtual void initStopWords ();
 
158
 
150
159
protected:
151
160
    typedef unsigned                              TWordId;
152
161
    typedef std::pair<TWordId, TWordId>           TBigram;
163
172
    TBigramPool             m_bifreq;
164
173
 
165
174
    std::string             m_history_path;
166
 
    static std::set<unsigned int>                  s_stopWords;
 
175
    std::set<unsigned int>  m_stopWords;
167
176
 
168
177
protected:
169
178
    double pr(TBigram& bg);