Пример #1
0
 def train(self):
     sys.stderr.write('creating training problem...')
     prob = problem(self.labels, self.contexts)
     sys.stderr.write('done\ntraining with option(s) "'+self.parameters+'"...')
     self.model = train(prob, parameter(self.parameters))
     sys.stderr.write('done\n')
Пример #2
0
 def __init__(self):
     self.class_cache = {}
     self.feat_cache = {}
     self.liblin_params = "-s 0"
     self.problem = problem()
Пример #3
0
 def __init__(self):
     self.class_cache = {}
     self.feat_cache = {}
     self.liblin_params = "-s 0"
     self.problem = problem()