Esempio n. 1
0
 def __init__(self, messages=None):
     self.messages = messages
     self.wordTypeInfer = WholeFieldTypeInfer(self.messages)
     self.cvter = Converter()
     self.wcvter = word_convert()
     self.msgSplt = MsgSpliter()
     self.dataTuning = DataTuning()
     self.icsSymTree = IcsSymbolToTree()
Esempio n. 2
0
 def reAjustBorders(self, words, messages):
     vSpliter = vertical_splitter(messages)
     words = vSpliter.splitWordsSimple(words)
     Nodes = []
     typeInfer = WholeFieldTypeInfer(messages)
     mgerItoms = base_merger()
     for word in words:
         if typeInfer.inferConst(word):
             tNode = node(loc=word, wType=1)
         else:
             tNode = node(loc=word, wType=6)
         Nodes.append(tNode)
     return mgerItoms.merge_words(Nodes)
Esempio n. 3
0
 def getCFormat(self, configParas, gVeparas, msgs):
     if len(msgs) < 10:
         return [((0, -1), 7)]
     gVoterLogic = GvoterLogic()
     boundaries = gVoterLogic.getSplitMessages(configParas,
                                               gVeparas,
                                               msgs,
                                               FType='C')
     boundaries = self.cvter.border2item(boundaries)
     #print('ss')
     #print(len(msgs))
     #print(msgs[0])
     #print(boundaries)
     #print('ee')
     fRange = self.getRanges(msgs)
     boundaries = self.cvter.filterB(boundaries, fRange)
     LoRdj = ReAjustLogic(boundaries, msgs)
     LoRdj.reSplit()
     LoRdj.reCluster()
     boundaries = LoRdj.words
     cWordTypeInfer = WholeFieldTypeInfer(msgs)
     wordsType = cWordTypeInfer.extractCWords(boundaries)
     wordsType = self.sortWordsType(wordsType)
     return wordsType
Esempio n. 4
0
 def __init__(self, messages):
     self.messages = messages
     self.wholeFieldInfer= WholeFieldTypeInfer(self.messages)
Esempio n. 5
0
 def __init__(self, messages, locs):
     self.messages = messages
     self.locs = locs
     self.gFieldInfer = WholeFieldTypeInfer()
Esempio n. 6
0
 def __init__(self, messages):
     super().__init__()
     self.wholeType = WholeFieldTypeInfer(messages)
Esempio n. 7
0
 def __init__(self):
     self.wTInfer = WholeFieldTypeInfer()
Esempio n. 8
0
 def __init__(self, words, msgs):
     self.words = words
     self.msgs = msgs
     self.wholeTypeInfer = WholeFieldTypeInfer(self.msgs)