def processStudent(base,dest,i,header,studentData,treeOptions,stayWeight,useWeka): filename = makeTemp('.arff') try: writeData(header,studentData,filename,i) createDT(filename,base,dest,stayWeight,treeOptions,useWeka) finally: os.remove(filename)
def processStudent(base, dest, i, header, studentData, treeOptions, stayWeight, useWeka): filename = makeTemp('.arff') try: writeData(header, studentData, filename, i) createDT(filename, base, dest, stayWeight, treeOptions, useWeka) finally: os.remove(filename)
def main(base, suffix, stayWeight, treeOptions, students, useWeka): makeDirs(base, False) header, studentData = readStudents(base, students) filename = makeTemp('.arff') try: writeData(header, studentData, filename) if len(suffix) > 0: if suffix[0] != '-': suffix = '-' + suffix dest = 'common%s' % (suffix) createDT(filename, base, dest, stayWeight, treeOptions, useWeka) finally: os.remove(filename)
def main(base,suffix,stayWeight,treeOptions,students,useWeka): makeDirs(base,False) header,studentData = readStudents(base,students) filename = makeTemp('.arff') try: writeData(header,studentData,filename) if len(suffix) > 0: if suffix[0] != '-': suffix = '-' + suffix dest = 'common%s' % (suffix) createDT(filename,base,dest,stayWeight,treeOptions,useWeka) finally: os.remove(filename)
def main(param1, param2): # Read and Parse XML textArray, posArray, entityArray, startEnt, endEnt = \ readData(param1, param2, False) # build Data entities, word, tag, entsums = buildData(textArray, posArray, entityArray) # Write out to a dictionary file (lib/data.py) writeData('data_trigram', 'entity.py', 'entityDict', entities) writeData('data_trigram', 'words.py', 'wordDict', word) writeData('data_trigram', 'entsums.py', 'entSums', entsums) writeData('data_trigram', 'tagged.py', 'tagDict', tag) writeData('data_trigram', 'start_entity.py', 'startEnt', startEnt) writeData('data_trigram', 'end_entity.py', 'endEnt', endEnt)
def main(param1, param2): # Read and Parse XML textArray, posArray, entityArray, startEnt, endEnt = \ readData(param1, param2, False) # build Data baseCombinedDict, baseWordDict, baseTagDict, entityDict, \ combined, word, tag = \ buildData(textArray, posArray, entityArray) supp = buildSupplementData() large_supp = buildLargeSupplementData() # Write out to a dictionary file (lib/data.py) writeData('data', 'base_combined.py', 'combinedDict', baseCombinedDict) writeData('data', 'base_words.py', 'wordDict', baseWordDict) writeData('data', 'base_tagged.py', 'tagDict', baseTagDict) writeData('data', 'entity.py', 'entityDict', entityDict) writeData('data', 'combined.py', 'combinedDict', combined) writeData('data', 'words.py', 'wordDict', word) writeData('data', 'tagged.py', 'tagDict', tag) writeData('data', 'start_entity.py', 'startEnt', startEnt) writeData('data', 'end_entity.py', 'endEnt', endEnt) writeData('data', 'supplement.py', 'supplement', supp) writeData('data', 'large_supp.py', 'large_supplement', large_supp)
def main(param1, param2): # Read and Parse XML textArray, posArray, entityArray = readData(param1, param2, False) # build Data baseCombinedDict, baseWordDict, baseTagDict, entityDict, combined, word, tag = buildData(textArray, posArray, entityArray) # Write out to a dictionary file (lib/data.py) writeData('data', 'base_combined.py', 'combinedDict', baseCombinedDict) writeData('data', 'base_words.py', 'wordDict', baseWordDict) writeData('data', 'base_tagged.py', 'tagDict', baseTagDict) writeData('data', 'entity.py', 'entityDict', entityDict) writeData('data', 'combined.py', 'combinedDict', combined) writeData('data', 'words.py', 'wordDict', word) writeData('data', 'tagged.py', 'tagDict', tag)
def main(param1, param2): # Read and Parse XML textArray, posArray, entityArray = readData(param1, param2, False) # build Data baseCombinedDict, baseWordDict, baseTagDict, entityDict, combined, word, tag = buildData( textArray, posArray, entityArray) # Write out to a dictionary file (lib/data.py) writeData('data', 'base_combined.py', 'combinedDict', baseCombinedDict) writeData('data', 'base_words.py', 'wordDict', baseWordDict) writeData('data', 'base_tagged.py', 'tagDict', baseTagDict) writeData('data', 'entity.py', 'entityDict', entityDict) writeData('data', 'combined.py', 'combinedDict', combined) writeData('data', 'words.py', 'wordDict', word) writeData('data', 'tagged.py', 'tagDict', tag)