Example #1
0
void
SunPinyinEngine::update_history_power()
{
    unsigned power = m_config.get(CONFIG_GENERAL_MEMORY_POWER, 3);
    CIMIContext* ic = m_pv->getIC();
    assert(ic);
    ic->setHistoryPower(power);
}
Example #2
0
void
SunPinyinEngine::update_charset_level()
{
    unsigned charset = m_config.get(CONFIG_GENERAL_CHARSET_LEVEL, GBK);
    CIMIContext* ic = m_pv->getIC();
    assert(ic);
    charset &= 3;               // charset can only be 0,1,2 or 3
    ic->setCharsetLevel(charset);
}
Example #3
0
CIMIContext *
CXhSimplifiedChinesePolicy::createContext()
{
    CIMIContext* pic = new CIMIContext();
    
	CInputTrieSource* ipt = new CInputTrieSource();
	ipt->setUserDict(&m_userDict);
	pic->setInputTrieSource(ipt);

	pic->setCoreData(&m_coreData);
    pic->setCharsetLevel(m_csLevel);
	pic->setHistoryMemory(&m_historyCache);

	CFullCharManager::setFullSymbolForwarding(m_bEnableFullSymbol);
	CFullCharManager::setGetFullSymbolOp(&m_getFullSymbolOp);

	CFullCharManager::setFullPunctForwarding(m_bEnableFullPunct);
	CFullCharManager::setGetFullPunctOp(&m_getFullPunctOp);
    return pic;
}
Example #4
0
CIMIContext *
CSimplifiedChinesePolicy::createContext()
{
    CIMIContext* pic = new CIMIContext ();
    pic->setCoreData (&m_coreData);
    pic->setHistoryMemory (&m_historyCache);
    pic->setUserDict (&m_userDict);

    pic->setCharsetLevel (m_csLevel);

    pic->setFullSymbolForwarding (m_bEnableFullSymbol);
    pic->setGetFullSymbolOp (&m_getFullSymbolOp);

    pic->setFullPunctForwarding (m_bEnableFullPunct);
    pic->setGetFullPunctOp (&m_getFullPunctOp);
    return pic;
}