Esempio n. 1
0
 def toJSON(self):
     ret = ConfigObject.toJSON(self)
     ret["name"] = self.stateName
     ret["onechar"] = self.onechar
     ret["emission"] = list()
     ret["startprob"] = self.startProbability
     ret["endprob"] = self.endProbability
     for (key, prob) in self.emissions.iteritems():
         ret["emission"].append((key, prob))
     return ret
Esempio n. 2
0
 def toJSON(self):
     ret = ConfigObject.toJSON(self)
     ret["annotations"] = self.annotations
     ret["sequences"] = list()
     for key, value in self.sequences.iteritems():
         ann = list()
         for akey, avalue in value.iteritems():
             ann.append({'id': akey, 'file': avalue[0], 'offset': avalue[1]})
         ret["sequences"].append({"name": key, "annotations": ann})
     return ret
Esempio n. 3
0
 def toJSON(self):
     ret = ConfigObject.toJSON(self)
     ret["annotations"] = self.annotations
     ret["sequences"] = list()
     for key, value in self.sequences.iteritems():
         ann = list()
         for akey, avalue in value.iteritems():
             ann.append({
                 'id': akey,
                 'file': avalue[0],
                 'offset': avalue[1]
             })
         ret["sequences"].append({"name": key, "annotations": ann})
     return ret
 def toJSON(self):
     ret = ConfigObject.toJSON(self)
     ret['p'] = self.p
     ret['start'] = self.start
     ret['fractions'] = self.fractions
     return ret         
 def toJSON(self):
     ret = ConfigObject.toJSON(self)
     ret['p'] = self.p
     ret['start'] = self.start
     ret['fractions'] = self.fractions
     return ret
Esempio n. 6
0
 def toJSON(self):
     ret = ConfigObject.toJSON(self)
     ret['val'] = self.value
     return ret
Esempio n. 7
0
 def toJSON(self):
     ret = ConfigObject.toJSON(self)
     ret['val'] = self.value
     return ret
Esempio n. 8
0
 def toJSON(self):
     ret = ConfigObject.toJSON(self)
     ret = self.statesToJSON(ret)
     ret = self.transitionsToJSON(ret)
     return ret