Created
December 7, 2010 05:06
Revisions
-
kvorion created this gist
Dec 7, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ def GetValues(self): file = open(self.trainingFile, 'r') for line in file: if line[0] != '@': #start of actual data self.featureVectors.append(line.strip().lower().split(',')) else: #feature definitions if line.strip().lower().find('@data') == -1 and (not line.lower().startswith('@relation')): self.featureNameList.append(line.strip().split()[1]) self.features[self.featureNameList[len(self.featureNameList) - 1]] = line[line.find('{')+1: line.find('}')].strip().split(',') file.close()