spyysalo / annodoc

Annodoc annotation documentation support system
http://spyysalo.github.io/annodoc
MIT License
35 stars 57 forks source link

How to change label color with CoNLL-U format? #15

Closed laurent-brisson closed 9 years ago

laurent-brisson commented 9 years ago

Hello !

First, thanks for this great tool :)

I wonder how to change label color in CoNLL-U format visualization. I found the file config.js where I can specify bgColor and borderColor, but I want to select these colors using the value in the MISC field of CoNLL-U format and not the CPOSTAG field.

Anyone could help me please ?

spyysalo commented 9 years ago

Thanks @laurent-brisson, glad it's useful to you!

Support for fine-grained custom styling is provided using "structured comments", see http://spyysalo.github.io/conllu.js/. As an example, you can say

# visual-style 1    bgColor:blue
# visual-style 2 1 nsubj    color:blue

to make the background of the first token and the color of the nsubj relation from the 2nd to the 1st token blue. Hope this helps!

laurent-brisson commented 9 years ago

Yes it helps ! Thank you for your quick answer !