|
From: <fri...@us...> - 2010-05-24 09:25:22
|
Revision: 10098
http://zaf.svn.sourceforge.net/zaf/?rev=10098&view=rev
Author: friedelwolff
Date: 2010-05-24 09:25:16 +0000 (Mon, 24 May 2010)
Log Message:
-----------
Handle empty rows in the CSV file correctly
Modified Paths:
--------------
trunk/dict/utils/csv2acor.py
Modified: trunk/dict/utils/csv2acor.py
===================================================================
--- trunk/dict/utils/csv2acor.py 2010-05-24 09:24:33 UTC (rev 10097)
+++ trunk/dict/utils/csv2acor.py 2010-05-24 09:25:16 UTC (rev 10098)
@@ -75,6 +75,8 @@
SentenceExceptListfile.write(fileheader+"\n")
csvreader = csv.reader(file(SentenceExceptList), calc)
for row in csvreader:
+ if not row:
+ continue
line = ' <block-list:block block-list:abbreviated-name="'+row[0]+'"/>'+"\n";
SentenceExceptListfile.write(line)
SentenceExceptListfile.write(filefooter+"\n")
@@ -84,6 +86,8 @@
WordExceptListfile.write(fileheader+"\n")
csvreader = csv.reader(file(WordExceptList), calc)
for row in csvreader:
+ if not row:
+ continue
line = ' <block-list:block block-list:abbreviated-name="'+row[0]+'"/>'+"\n";
WordExceptListfile.write(line)
WordExceptListfile.write(filefooter+"\n")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|