| /nv-g11n/inputmethod/sunpinyin/ime/src/slm/ |
| slm.cpp | 198 double pr = m_prTable[pBase[idx].pr()]; local 199 return (m_UseLogPr)?(cost+pr):(cost*pr); 208 double pr = m_prTable[pBase[idx].pr()]; local 209 return (m_UseLogPr)?(cost+pr):(cost*pr); 226 return cost + m_prTable[((TNode *)m_Levels[0])->pr()]; 228 return cost * m_prTable[((TNode *)m_Levels[0])->pr()]; [all...] |
| slm.h | 48 * -# Compact all float value of -log(pr) into 65536 (16 bits) 50 * -# Compact all float value of -log(pr) into 16384 (14 bits) 125 unsigned int pr() const function in struct:CThreadSlm::TNode 155 void set_pr(unsigned int pr) 157 m_pr = pr; 239 inline unsigned int pr() const { return ((m_pr_hi << 14) + m_pr_lo); } function in struct:CThreadSlm::TLeaf 244 inline void set_pr(unsigned int pr) { m_pr_hi = ((pr >> 14) & 0x3); m_pr_lo = pr & 0x3FFF; }
|
| /nv-g11n/inputmethod/sunpinyin/slm/src/slm/ |
| sim_slm.h | 56 PR_TYPE pr; member in union:CSIMSlm::TLeaf::__anon336
|
| slm.cpp | 200 double pr = m_prTable[pBase[idx].pr()]; local 201 return (m_UseLogPr)?(cost+pr):(cost*pr); 210 double pr = m_prTable[pBase[idx].pr()]; local 211 return (m_UseLogPr)?(cost+pr):(cost*pr); 228 return cost + m_prTable[((TNode *)m_Levels[0])->pr()]; 230 return cost * m_prTable[((TNode *)m_Levels[0])->pr()]; [all...] |
| sim_slmbuilder.cpp | 347 double pr = disc->discount(ch[h].freq) / root_freq; local 348 assert(pr > 0.0 && pr < 1.0); 350 ch[h].pr = CSlmBuilder::PR_TYPE( -log(pr) ); 352 ch[h].pr = CSlmBuilder::PR_TYPE( pr ); 381 v0[0].pr = PR_TYPE(-log(double(1.0)/m_nWord)); 383 v0[0].pr = PR_TYPE(double(1.0)/m_nWord); 395 sumnext += exp(-(chh->pr)); [all...] |
| slm.h | 48 * -# Compact all float value of -log(pr) into 65536 (16 bits) 50 * -# Compact all float value of -log(pr) into 16384 (14 bits) 125 unsigned int pr() const function in struct:CThreadSlm::TNode 155 void set_pr(unsigned int pr) 157 m_pr = pr; 239 inline unsigned int pr() const { return ((m_pr_hi << 14) + m_pr_lo); } function in struct:CThreadSlm::TLeaf 244 inline void set_pr(unsigned int pr) { m_pr_hi = ((pr >> 14) & 0x3); m_pr_lo = pr & 0x3FFF; }
|
| /nv-g11n/inputmethod/sunpinyin/slm/src/slm/tslmpack/ |
| arpa_slm.h | 52 float pr; member in struct:CArpaSlm::TLeaf 58 TLeaf() : wid(0), pr(.0), ch(0), bon(0), bol(0) {}
|
| /nv-g11n/inputmethod/sunpinyin2/src/slm/ |
| sim_slm.h | 56 PR_TYPE pr; member in union:CSIMSlm::TLeaf::__anon6
|
| slm.cpp | 206 double pr = m_prTable[pBase[idx].pr()]; local 207 return (m_UseLogPr)?(cost+pr):(cost*pr); 216 double pr = m_prTable[pBase[idx].pr()]; local 217 return (m_UseLogPr)?(cost+pr):(cost*pr); 234 return cost + m_prTable[((TNode *)m_Levels[0])->pr()]; 236 return cost * m_prTable[((TNode *)m_Levels[0])->pr()]; [all...] |
| sim_slmbuilder.cpp | 347 double pr = disc->discount(ch[h].freq) / root_freq; local 348 assert(pr > 0.0 && pr < 1.0); 350 ch[h].pr = CSlmBuilder::PR_TYPE( -log(pr) ); 352 ch[h].pr = CSlmBuilder::PR_TYPE( pr ); 381 v0[0].pr = PR_TYPE(-log(double(1.0)/m_nWord)); 383 v0[0].pr = PR_TYPE(double(1.0)/m_nWord); 395 sumnext += exp(-(chh->pr)); [all...] |
| slm.h | 48 * -# Compact all float value of -log(pr) into 65536 (16 bits) 50 * -# Compact all float value of -log(pr) into 16384 (14 bits) 125 unsigned int pr() const function in struct:CThreadSlm::TNode 155 void set_pr(unsigned int pr) 157 m_pr = pr; 239 inline unsigned int pr() const { return ((m_pr_hi << 14) + m_pr_lo); } function in struct:CThreadSlm::TLeaf 244 inline void set_pr(unsigned int pr) { m_pr_hi = ((pr >> 14) & 0x3); m_pr_lo = pr & 0x3FFF; }
|
| /nv-g11n/inputmethod/sunpinyin2/src/slm/tslmpack/ |
| arpa_slm.h | 52 float pr; member in struct:CArpaSlm::TLeaf 58 TLeaf() : wid(0), pr(.0), ch(0), bon(0), bol(0) {}
|
| /nv-g11n/inputmethod/sunpinyin/slm/src/slm/tslminfo/ |
| tslminfo.cpp | 155 printf(" -p # Prefer normal probability instead of -log(Pr) which is default. Valid under -v option.\n"); 168 {"pr", 0, 0, 'p'}, 250 double pr = itslm.mapPr(pn->pr(), use_log_pr); local 252 printf("%16.12lf %16.12lf ", pr, bow); 263 double pr = itslm.mapPr(pn->pr(), use_log_pr); local 264 printf("%16.12lf ", pr); 289 printf((itslm.isUseLogPr())?" using -log(pr)\n":" using direct pr\n") [all...] |
| /nv-g11n/inputmethod/sunpinyin/ime/src/ |
| ic_history.cpp | 61 double CICHistory::pr(unsigned int* its_wid, unsigned int* ite_wid) function in class:CICHistory 66 double CICHistory::pr(unsigned int* its_wid, unsigned int* ite_wid, unsigned int wid) function in class:CICHistory 172 double CBigramHistory::pr(unsigned int* its_wid, unsigned int* ite_wid) function in class:CBigramHistory 181 return pr(bigram); 184 double CBigramHistory::pr(unsigned int* its_wid, unsigned int* ite_wid, unsigned int wid) function in class:CBigramHistory 190 return pr(bigram); 252 double CBigramHistory::pr(TBigram& bigram) function in class:CBigramHistory 257 double pr = 0.0; local 258 pr += 0.68*double(bf)/double(uf0+0.5); 259 pr += 0.32*double(uf1)/double(m_memory.size() + (contxt_memory_size-m_memory.size())/10) [all...] |
| /nv-g11n/inputmethod/sunpinyin2/src/slm/tslminfo/ |
| tslminfo.cpp | 155 printf(" -p # Prefer normal probability instead of -log(Pr) which is default. Valid under -v option.\n"); 168 {"pr", 0, 0, 'p'}, 250 double pr = itslm.mapPr(pn->pr(), use_log_pr); local 252 printf("%16.12lf %16.12lf ", pr, bow); 263 double pr = itslm.mapPr(pn->pr(), use_log_pr); local 264 printf("%16.12lf ", pr); 289 printf((itslm.isUseLogPr())?" using -log(pr)\n":" using direct pr\n") [all...] |
| /nv-g11n/inputmethod/sunpinyin2/src/ime-core/ |
| ic_history.cpp | 67 double CICHistory::pr(unsigned* its_wid, unsigned* ite_wid) function in class:CICHistory 72 double CICHistory::pr(unsigned* its_wid, unsigned* ite_wid, unsigned wid) function in class:CICHistory 178 double CBigramHistory::pr(unsigned* its_wid, unsigned* ite_wid) function in class:CBigramHistory 187 return pr(bigram); 190 double CBigramHistory::pr(unsigned* its_wid, unsigned* ite_wid, unsigned wid) function in class:CBigramHistory 196 return pr(bigram); 297 double CBigramHistory::pr(TBigram& bigram) function in class:CBigramHistory 302 double pr = 0.0; local 303 pr += 0.68*double(bf)/double(uf0+0.5); 304 pr += 0.32*double(uf1)/double(m_memory.size() + (contxt_memory_size-m_memory.size())/10) [all...] |
| /nv-g11n/inputmethod/sunpinyin/slm/src/slm/slmprune/ |
| slmprune.cpp | 143 //cut item whoese pr == 1.0; and not psuedo tail 144 if (chchk->pr != ((bUseLogPr)?0.0:1.0) || (chchk+1) == chlast) { 204 // because pr in model can not be 1.0, so we use this to mark a item to be prune 208 (((TLeaf*)level[lvl]) + pinfo->idx)->pr = 0.0; // -log(1.0) 210 (((TLeaf*)level[lvl]) + pinfo->idx)->pr = 1.0; 213 (((TNode*)level[lvl]) + pinfo->idx)->pr = 0.0; // -log(1.0) 215 (((TNode*)level[lvl]) + pinfo->idx)->pr = 1.0; // -log(1.0) 238 sumnext += exp(-double(chh->pr)); 240 sumnext += double(chh->pr); 290 double PA, PB, PHW, PH_W, PH, BOW, _BOW, pr, p_r local [all...] |
| /nv-g11n/inputmethod/sunpinyin2/src/slm/slmprune/ |
| slmprune.cpp | 143 //cut item whoese pr == 1.0; and not psuedo tail 144 if (chchk->pr != ((bUseLogPr)?0.0:1.0) || (chchk+1) == chlast) { 204 // because pr in model can not be 1.0, so we use this to mark a item to be prune 208 (((TLeaf*)level[lvl]) + pinfo->idx)->pr = 0.0; // -log(1.0) 210 (((TLeaf*)level[lvl]) + pinfo->idx)->pr = 1.0; 213 (((TNode*)level[lvl]) + pinfo->idx)->pr = 0.0; // -log(1.0) 215 (((TNode*)level[lvl]) + pinfo->idx)->pr = 1.0; // -log(1.0) 238 sumnext += exp(-double(chh->pr)); 240 sumnext += double(chh->pr); 290 double PA, PB, PHW, PH_W, PH, BOW, _BOW, pr, p_r local [all...] |
| /nv-g11n/inputmethod/sunpinyin2/wrapper/ibus/setup/ |
| main.py | 54 def pr(message): member in class:Logger
|
| /nv-g11n/inputmethod/sunpinyin/slm/src/slm/slmseg/ |
| slmseg.cpp | 200 TLatticeStateValue(double pr=0.0, TLatticeWord* btword=NULL, CThreadSlm::TState btstate = CThreadSlm::TState()) 201 : m_pr(pr), mp_btword(btword), m_btstate(btstate) { } 254 * pr = 0 and its mp_btword == NULL; 301 double pr = itss->second.m_pr; local 302 pr += s_tslm->transferNegLog(his, itws->m_wordId, his); 307 rss[his] = TLatticeStateValue(pr, &(*itws), itss->first); 309 if (itn->second.m_pr > pr) { 310 rss[his] = TLatticeStateValue(pr, &(*itws), itss->first);
|
| /nv-g11n/inputmethod/sunpinyin2/src/slm/slmseg/ |
| slmseg.cpp | 200 TLatticeStateValue(double pr=0.0, TLatticeWord* btword=NULL, CThreadSlm::TState btstate = CThreadSlm::TState()) 201 : m_pr(pr), mp_btword(btword), m_btstate(btstate) { } 254 * pr = 0 and its mp_btword == NULL; 301 double pr = itss->second.m_pr; local 302 pr += s_tslm->transferNegLog(his, itws->m_wordId, his); 307 rss[his] = TLatticeStateValue(pr, &(*itws), itss->first); 309 if (itn->second.m_pr > pr) { 310 rss[his] = TLatticeStateValue(pr, &(*itws), itss->first);
|