Commit a72879fb authored by Anze Vavpetic's avatar Anze Vavpetic
Browse files

fixed bug: dumping aleph features to arff would produce an unparsable file

parent 9505cea1
......@@ -218,7 +218,7 @@ class Aleph(object):
examples = re.findall(r"example\((\w+),(\[[\d,]*\]),(\w+)\)\.", pl_dataset)
for _, features, cls in examples:
vals = []
for i in range(1, class_id):
for i in range(0, class_id):
vals.append('1' if i in json.loads(features) else '0')
cat('%s' % ','.join(vals))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment