Ejemplo n.º 1
0
def trainingPass(combinedResults,trainingType):
    count = len(combinedResults)
    print 'Performing %s on %d utterances...           ' % (trainingType,count),
    natlink.startTraining(trainingType)
    for result in combinedResults:
        result[1].correction(result[0])
        count = count - 1
        sys.stdout.write('\b\b\b\b\b\b\b\b\b\b%5d left' % count)
    natlink.finishTraining()
    print ''
Ejemplo n.º 2
0
def trainingPass(combinedResults, trainingType):
    count = len(combinedResults)
    print 'Performing %s on %d utterances...           ' % (trainingType,
                                                            count),
    natlink.startTraining(trainingType)
    for result in combinedResults:
        result[1].correction(result[0])
        count = count - 1
        sys.stdout.write('\b\b\b\b\b\b\b\b\b\b%5d left' % count)
    natlink.finishTraining()
    print ''
Ejemplo n.º 3
0
 def onStart(self, nID, code):
     print 'training started'
     self.AreTraining = 1
     if TrainInBatchMode:
         if not self.Batch:
             natlink.startTraining('batchadapt')
             self.Batch = 1
             print 'batch training started'
         else:
             print 'wat'
     self.butOK.EnableWindow(1)
     self.butStop.EnableWindow(1)
     self.butStart.EnableWindow(0)
     self.CurItem = self.CurItem - 1
     self.itemsControl.SetFocus()
     self.nextWord()
Ejemplo n.º 4
0
 def onStart(self,nID,code):
     print 'training started'
     self.AreTraining=1
     if TrainInBatchMode:
         if not self.Batch:
             natlink.startTraining('batchadapt')
             self.Batch=1
             print 'batch training started'
         else:
             print 'wat'
     self.butOK.EnableWindow(1) 
     self.butStop.EnableWindow(1) 
     self.butStart.EnableWindow(0)
     self.CurItem = self.CurItem - 1
     self.itemsControl.SetFocus()
     self.nextWord()