コード例 #1
0
ファイル: updater.py プロジェクト: chatch/pinyin-toolkit
 def generatemeasureword(self, dictmeasurewords):
     if dictmeasurewords == None or len(dictmeasurewords) == 0:
         # No measure word, so don't update the field
         return None
     
     # Concatenate the measure words together with - before we put them into the MW field
     return preparetokens(self.config, dictionary.flattenmeasurewords(dictmeasurewords))
コード例 #2
0
ファイル: updater.py プロジェクト: idavydov/pinyin-toolkit
    def generatemeasureword(self, dictmeasurewords):
        if dictmeasurewords == None or len(dictmeasurewords) == 0:
            # No measure word, so don't update the field
            return None

        # Concatenate the measure words together with - before we put them into the MW field
        return preparetokens(self.config,
                             dictionary.flattenmeasurewords(dictmeasurewords))
コード例 #3
0
ファイル: updatergraph.py プロジェクト: yinzi/pinyin-toolkit
 def mergeddictmws2mw(self, mergeddictmws):
     # Concatenate the measure words together with - before we put them into the MW field
     return preparetokens(self.config, dictionary.flattenmeasurewords(mergeddictmws))
コード例 #4
0
 def mergeddictmws2mw(self, mergeddictmws):
     # Concatenate the measure words together with - before we put them into the MW field
     return preparetokens(self.config, dictionary.flattenmeasurewords(mergeddictmws))