Skip to content
Snippets Groups Projects
Commit b83580f0 authored by Franck Dary's avatar Franck Dary
Browse files

Improved script conllu2tikz

parent f716d0df
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,12 @@ def generateTikz(text, sentence, col2index, index2col, idCol, nodeCol, govCol, l
gov = int(word[col2index[govCol]])
label = word[col2index[labelCol]]
extra = [word[col2index[col]] for col in extraCols]
# Reducing size of elements ex. gender=fem|pers=3p -> fem|3p
for i in range(len(extra)) :
if "|" in extra[i] :
args = extra[i].split("|")
extra[i] = "|".join([a.split('=')[-1] for a in args])
extra[i] = extra[i].replace('_','\_')
nodes.append(Node(wordId, name, gov, label, extra))
print("""\\begin{figure}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment