From 9cbefb57057667816538c864d48bafdc372b5053 Mon Sep 17 00:00:00 2001 From: flatberg Date: Wed, 14 Mar 2007 10:24:49 +0000 Subject: [PATCH] in write_ftsv: adjusted so it splits specifically on tab, whitespace allowed in annotations --- fluents/annotations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluents/annotations.py b/fluents/annotations.py index 56f82c5..e0ce4af 100644 --- a/fluents/annotations.py +++ b/fluents/annotations.py @@ -78,7 +78,7 @@ def read_annotations_file(filename): ## Read the first line, which contains the dimension name and ## annotation names. line = fd.readline() - values = [x.strip() for x in line.split()] + values = [x.strip() for x in line.split('\t')] dimname = values[0] annotation_names = values[1:] annotation_dicts = [{} for x in annotation_names] @@ -86,7 +86,7 @@ def read_annotations_file(filename): ## Read the lines containing the annotations. The first value on ## each line is an id along the dimension. while line: - values = [x.strip() for x in line.split()] + values = [x.strip() for x in line.split('\t')] for i, x in enumerate(values[1:]): annotation_dicts[i][values[0]] = x line = fd.readline()