Commit 79433eb7 authored by Bruno Guillaume's avatar Bruno Guillaume

Fix Conll loading

parent 39c9de36
......@@ -11,14 +11,16 @@ def load_conll (filename):
sent=None
cpt=0
for l in lines:
if l != '' and sent == None: # beginning
sent = [l]
offsets = offsets+[cpt]
if l != '' and sent != None: # middle
sent = sent+[l]
if l == '' and sent != None: # end
sentences=sentences+[sent]
sent = None
if l != '':
if sent == None:
sent = [l]
offsets = offsets+[cpt]
else:
sent = sent+[l]
else:
if sent != None: # end
sentences=sentences+[sent]
sent = None
cpt += 1
return (sentences, offsets)
......
Markdown is supported
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