n_elements = 0
n_rows = 0
for line in file:
items = set(mo.group(1).strip()
for mo in self.re_name.finditer(line))
names.update(items)
n_elements += len(items)
n_rows += 1
return names, n_elements, n_rows
def construct_domain(self, names):
attributes = [ContinuousVariable.make(name) for name in sorted(names)]
After Change
else:
names = set()
classes = set()
file.seek(0)
reader = csv.reader(file)
for line in reader:
names.update(mo.split("=")[0] for mo in line)
n_elements += len(line)