HomeSort by relevance Sort by last modified time
    Searched refs:wid (Results 1 - 25 of 43) sorted by null

1 2

  /nv-g11n/inputmethod/sunpinyin/slm/src/lexicon/
genPYT.cpp 52 getCost(unsigned int wid);
55 isSeen(unsigned int wid);
70 CUnigramSorter::getCost(unsigned int wid)
73 return m_Model.transferNegLog(st, wid, st);
77 CUnigramSorter::isSeen(unsigned int wid)
80 double logpr = m_Model.transferNegLog(st, wid, st);
81 //printf(" -log(pr(%d)) = %lf\n", wid, logpr);
pytrie_gen.h 48 getCost(unsigned int wid) = 0;
51 isSeen(unsigned int wid) = 0;
184 insertFullPinyinPair(const char* pinyin, TWordId wid);
197 * -# double getCost(TWordId wid) \n
198 * the less the cost, the better the wid
  /nv-g11n/inputmethod/sunpinyin2/src/lexicon/
genPYT.cpp 48 getCost(unsigned int wid);
51 isSeen(unsigned int wid);
66 CUnigramSorter::getCost(unsigned int wid)
69 return m_Model.transferNegLog(st, wid, st);
73 CUnigramSorter::isSeen(unsigned int wid)
76 double logpr = m_Model.transferNegLog(st, wid, st);
77 //printf(" -log(pr(%d)) = %lf\n", wid, logpr);
  /nv-g11n/inputmethod/sunpinyin/slm/python/
mmseg.py 105 def output_word(wid, word):
107 if wid == options['ambi-id']:
110 word = word+'('+str(wid)+')'
113 sys.stdout.write(struct.pack('l', wid))
121 wid, l = match_longest(dict, strbuf)
122 if wid == 0:
127 wid, l = options['ambi-id'], ambi_len
129 output_word (wid, strbuf[:l])
  /nv-g11n/inputmethod/sunpinyin2/python/
mmseg.py 105 def output_word(wid, word):
107 if wid == options['ambi-id']:
110 word = word+'('+str(wid)+')'
113 sys.stdout.write(struct.pack('l', wid))
121 wid, l = match_longest(dict, strbuf)
122 if wid == 0:
127 wid, l = options['ambi-id'], ambi_len
129 output_word (wid, strbuf[:l])
  /nv-g11n/inputmethod/sunpinyin2/src/ime-core/
userdict.h 60 void removeWord (unsigned wid);
64 const TWCHAR* operator [] (unsigned wid);
ic_history.h 57 virtual bool seenBefore(unsigned int wid);
75 * @return pr(*wid | *its_wid, ..., *(ite_wid-1))
78 virtual double pr(unsigned int* its_wid, unsigned int* ite_wid, unsigned int wid);
109 virtual bool seenBefore(unsigned int wid);
123 * @return pr(*wid | *(ite_wid-1))
125 virtual double pr(unsigned int* its_wid, unsigned int* ite_wid, unsigned int wid);
userdict.cpp 104 void CUserDict::removeWord (unsigned wid)
110 if (wid > INI_USRDEF_WID) {
111 sprintf(sql, "%s%d;", sql, (wid - INI_USRDEF_WID));
188 const TWCHAR* CUserDict::operator [] (unsigned wid)
197 if (wid <= INI_USRDEF_WID || wid > MAX_USRDEF_WID)
200 wid -= INI_USRDEF_WID;
202 std::map<unsigned, wstring>::const_iterator it = m_dict.find(wid);
206 sprintf (sql_str, "SELECT utf8str FROM dict WHERE id=%d;", wid);
221 m_dict.insert (std::make_pair (wid, wstr))
    [all...]
ic_history.cpp 57 bool CICHistory::seenBefore(unsigned wid)
72 double CICHistory::pr(unsigned* its_wid, unsigned* ite_wid, unsigned wid)
190 double CBigramHistory::pr(unsigned* its_wid, unsigned* ite_wid, unsigned wid)
195 bigram.second = wid;
347 bool CBigramHistory::seenBefore(unsigned wid)
349 return (wid != DCWID && s_stopWords.find(wid) == s_stopWords.end() &&
350 m_unifreq.find(wid) != m_unifreq.end());
  /nv-g11n/inputmethod/sunpinyin/ime/src/
ic_history.h 57 virtual bool seenBefore(unsigned int wid);
75 * @return pr(*wid | *its_wid, ..., *(ite_wid-1))
78 virtual double pr(unsigned int* its_wid, unsigned int* ite_wid, unsigned int wid);
109 virtual bool seenBefore(unsigned int wid);
123 * @return pr(*wid | *(ite_wid-1))
125 virtual double pr(unsigned int* its_wid, unsigned int* ite_wid, unsigned int wid);
ic_history.cpp 51 bool CICHistory::seenBefore(unsigned int wid)
66 double CICHistory::pr(unsigned int* its_wid, unsigned int* ite_wid, unsigned int wid)
184 double CBigramHistory::pr(unsigned int* its_wid, unsigned int* ite_wid, unsigned int wid)
189 bigram.second = wid;
302 bool CBigramHistory::seenBefore(unsigned int wid)
304 return (wid != DCWID && s_stopWords.find(wid) == s_stopWords.end() &&
305 m_unifreq.find(wid) != m_unifreq.end());
  /nv-g11n/inputmethod/sunpinyin/ime/src/slm/
slm.h 65 * double transfer(TState& history, unsigned int wid, TState& result);
115 unsigned int wid() const function in struct:CThreadSlm::TNode
145 void set_wid(unsigned int wid)
147 m_wid = wid;
236 inline unsigned int wid() const { return m_wid; } function in struct:CThreadSlm::TLeaf
241 inline void set_wid(unsigned int wid) { m_wid = wid; }
314 transferNegLog(TState history, unsigned int wid, TState& result);
317 transfer(TState history, unsigned int wid, TState& result);
330 rawTransfer(TState history, unsigned int wid, TState& result)
    [all...]
slm.cpp 154 unsigned int thisId = pm->wid();
172 CThreadSlm::rawTransfer(TState history, unsigned int wid, TState& result)
181 if (ID_NOT_WORD == wid) {
194 unsigned int idx = find_id(pBase, pn->ch(), t, wid);
204 unsigned int idx = find_id(pBase, pn->ch(), t, wid);
232 CThreadSlm::transferNegLog(TState history, unsigned int wid, TState& result)
234 double cost = rawTransfer(history, wid, result);
242 CThreadSlm::transfer(TState history, unsigned int wid, TState& result)
244 double cost = rawTransfer(history, wid, result);
257 return pn->wid();
    [all...]
  /nv-g11n/inputmethod/sunpinyin/slm/src/slm/
slm.h 65 * double transfer(TState& history, unsigned int wid, TState& result);
115 unsigned int wid() const function in struct:CThreadSlm::TNode
145 void set_wid(unsigned int wid)
147 m_wid = wid;
236 inline unsigned int wid() const { return m_wid; } function in struct:CThreadSlm::TLeaf
241 inline void set_wid(unsigned int wid) { m_wid = wid; }
314 transferNegLog(TState history, unsigned int wid, TState& result);
317 transfer(TState history, unsigned int wid, TState& result);
330 rawTransfer(TState history, unsigned int wid, TState& result)
    [all...]
slm.cpp 156 unsigned int thisId = pm->wid();
174 CThreadSlm::rawTransfer(TState history, unsigned int wid, TState& result)
183 if (ID_NOT_WORD == wid) {
196 unsigned int idx = find_id(pBase, pn->ch(), t, wid);
206 unsigned int idx = find_id(pBase, pn->ch(), t, wid);
234 CThreadSlm::transferNegLog(TState history, unsigned int wid, TState& result)
236 double cost = rawTransfer(history, wid, result);
244 CThreadSlm::transfer(TState history, unsigned int wid, TState& result)
246 double cost = rawTransfer(history, wid, result);
259 return pn->wid();
    [all...]
sim_dict.h 53 TState(TSIMWordId wid=SIM_ID_NOT_WORD) : word_id(wid), follow(NULL) { }
  /nv-g11n/inputmethod/sunpinyin2/src/slm/
slm.h 65 * double transfer(TState& history, unsigned int wid, TState& result);
115 unsigned int wid() const function in struct:CThreadSlm::TNode
145 void set_wid(unsigned int wid)
147 m_wid = wid;
236 inline unsigned int wid() const { return m_wid; } function in struct:CThreadSlm::TLeaf
241 inline void set_wid(unsigned int wid) { m_wid = wid; }
314 transferNegLog(TState history, unsigned int wid, TState& result);
317 transfer(TState history, unsigned int wid, TState& result);
330 rawTransfer(TState history, unsigned int wid, TState& result)
    [all...]
slm.cpp 162 unsigned int thisId = pm->wid();
180 CThreadSlm::rawTransfer(TState history, unsigned int wid, TState& result)
189 if (ID_NOT_WORD == wid) {
202 unsigned int idx = find_id(pBase, pn->ch(), t, wid);
212 unsigned int idx = find_id(pBase, pn->ch(), t, wid);
240 CThreadSlm::transferNegLog(TState history, unsigned int wid, TState& result)
242 double cost = rawTransfer(history, wid, result);
250 CThreadSlm::transfer(TState history, unsigned int wid, TState& result)
252 double cost = rawTransfer(history, wid, result);
265 return pn->wid();
    [all...]
sim_dict.h 53 TState(TSIMWordId wid=SIM_ID_NOT_WORD) : word_id(wid), follow(NULL) { }
  /nv-g11n/inputmethod/sunpinyin/slm/src/slm/tslmpack/
arpa_slm.h 51 TSIMWordId wid; member in struct:CArpaSlm::TLeaf
58 TLeaf() : wid(0), pr(.0), ch(0), bon(0), bol(0) {}
94 * initialize the `ch' and `wid' fields of each node in levels
arpa_slm.cpp 80 unsigned wid; local
82 wid = lexi->second;
85 wid = 0;
87 return wid;
104 wid = hw[nword++] = get_wid(word, lexicon);
141 wid = 0;
  /nv-g11n/inputmethod/sunpinyin2/src/slm/tslmpack/
arpa_slm.h 51 TSIMWordId wid; member in struct:CArpaSlm::TLeaf
58 TLeaf() : wid(0), pr(.0), ch(0), bon(0), bol(0) {}
94 * initialize the `ch' and `wid' fields of each node in levels
arpa_slm.cpp 80 unsigned wid; local
82 wid = lexi->second;
85 wid = 0;
87 return wid;
104 wid = hw[nword++] = get_wid(word, lexicon);
141 wid = 0;
  /nv-g11n/inputmethod/sunpinyin/slm/src/slm/tslminfo/
tslminfo.cpp 237 printf("%s ", (*plexicon)[pn->wid()].c_str());
239 printf("%9d ", pn->wid());
245 printf("%s ", ((*plexicon)[pn->wid()]).c_str());
247 printf("%9d ", pn->wid());
258 printf("%s ", ((*plexicon)[pn->wid()]).c_str());
260 printf("%9d ", pn->wid());
  /nv-g11n/inputmethod/sunpinyin2/src/slm/tslminfo/
tslminfo.cpp 237 printf("%s ", (*plexicon)[pn->wid()].c_str());
239 printf("%9d ", pn->wid());
245 printf("%s ", ((*plexicon)[pn->wid()]).c_str());
247 printf("%9d ", pn->wid());
258 printf("%s ", ((*plexicon)[pn->wid()]).c_str());
260 printf("%9d ", pn->wid());

Completed in 420 milliseconds

1 2