Logo Search packages:      
Sourcecode: ibus-table version File versions  Download package

def tabsqlitedb::tabsqlitedb::find_zi_code (   self,
  zi 
)

Check word freq and user_freq

Definition at line 993 of file tabsqlitedb.py.

00993                               :
        '''Check word freq and user_freq
        '''
        zi = zi.decode('utf8')
        sqlstr = '''SELECT * FROM main.phrases WHERE phrase = ?
        ORDER BY mlen ASC;
''' 
        result = self.db.execute(sqlstr, (zi,)).fetchall()
        #self.db.commit()
        codes = []
        try:
            if result:
                for _res in result:
                    tabkey = u''
                    for i in range ( int ( _res[0] ) ):
                        tabkey += self.deparse ( _res[2+i] )
                    codes.append(tabkey)
        except:
            import traceback
            traceback.print_exc ()
        return codes[:]

    def remove_phrase (self,phrase,database='user_db'):


Generated by  Doxygen 1.6.0   Back to index