fixing tabstops
This commit is contained in:
parent
3fbf5fad68
commit
9f0ef37d80
@ -25,9 +25,10 @@ CONLLU_ATTRIBUTES = [
|
||||
|
||||
def replace_tab(s, tabstop=4):
|
||||
result = str()
|
||||
s = s.replace("\t", " \t")
|
||||
for c in s:
|
||||
if c == '\t':
|
||||
while (len(result) % tabstop != 0):
|
||||
while (len(result) % (tabstop) != 0):
|
||||
result += ' '
|
||||
else:
|
||||
result += c
|
||||
@ -151,7 +152,7 @@ class ConlluGenerator(object):
|
||||
else:
|
||||
stemmed_token = self.stemmer.stem(token)
|
||||
collnu_doc.add(ConlluElement(
|
||||
id=self.id_counter,
|
||||
id=self.id_counter + 1,
|
||||
form=token,
|
||||
lemma=stemmed_token
|
||||
))
|
||||
|
Loading…
Reference in New Issue
Block a user