コード例 #1
0
ファイル: imi_context.cpp プロジェクト: sunpinyin/sunpinyin
bool
CIMIContext::buildLattice(IPySegmentor *segmentor, bool doSearch)
{
    m_pPySegmentor = segmentor;
    return _buildLattice(segmentor->getSegments(),
                         segmentor->updatedFrom() + 1, doSearch);
}
コード例 #2
0
ファイル: imi_context.cpp プロジェクト: sunpinyin/sunpinyin
void
CIMIContext::deleteCandidateByWID(unsigned wid)
{
    if (wid > INI_USRDEF_WID) {
        m_pHistory->forget(wid);
        m_pUserDict->removeWord(wid);
        _buildLattice(m_pPySegmentor->getSegments());
    }
}
コード例 #3
0
ファイル: imi_context.cpp プロジェクト: iksky/sunpinyin
void CIMIContext::deleteCandidate (CCandidate &candi)
{
    unsigned wid = candi.m_wordId;

    if (wid > INI_USRDEF_WID) {
        m_pHistory->forget (wid);
        m_pUserDict->removeWord (wid);
        _buildLattice (m_pPySegmentor->getSegments(), candi.m_start+1);
    }
}