proycon / flat

FoLiA Linguistic Annotation Tool -- Flat is a web-based linguistic annotation environment based around the FoLiA format (http://proycon.github.io/folia), a rich XML-based format for linguistic annotation. Flat allows users to view annotated FoLiA documents and enrich these documents with new annotations, a wide variety of linguistic annotation types is supported through the FoLiA paradigm.
GNU General Public License v3.0
110 stars 15 forks source link

Question: entity tag color scheme #180

Closed pirolen closed 2 years ago

pirolen commented 3 years ago

Is it possible to influence how colors are allocated to entity tags in FLAT? It seems that they are allocated in the same order when starting annotating a new document (green - lila -red -yellow, etc), but in the order of the entity types that are clicked to annotate.

So two documents would not get the same color coding. I.e., if in one document the first entity I label is 'person', then in this doc 'person' is visualized as green. But if in the second doc the first entity I label is 'org' and the second is 'person', then 'org' gets color-coded as green, and 'person' as lila.

I would like to color code entities in all docs in the same way.

proycon commented 3 years ago

That's a good point, the colours are currently indeed assigned as they are found in the document, up to a total of like 7 colours, because we're rather limited in what colours can be easily discerned. FLAT also takes care to ensure the most frequent classes are assigned the 7 colours, the remaining classes will be marked gray.

But I see what you mean; having colour coding that would be consistent across documents sounds like a better idea. It should be doable when the classes are defined in a FoLiA set definition, I could assign the colours based on the order the classes are defined there, though we'd lose the 'frequency advantage' and may run out of colours. I could also see if I can stretch the limit of 7 a bit further (but if I take that too far the categories will be hard to distinguish).

pirolen commented 3 years ago

Thank you, would be great!

pirolen commented 3 years ago

One thing I also keep noticing about colors, is that often when an entity is assigned a tag (e.g. person), the color of this tag for a while does not correspond to the color that the 'person' tag is allocated (say green), but it is marked up with a different color. I mean, e.g this newly marked person is e.g. lila for a while after I annotated it, but afterwards it changes to the correct color (e.g. green) :-o

proycon commented 3 years ago

This new feature is now implemented and enabled by default in the latest development version (0.10.2, not released yet). For the old behaviour, set "colorbyfreq": True in the configuration.

@pirolen This might also fix the wrong colour on assignment problem you reported above, as colours will now jump around less.

pirolen commented 3 years ago

Thank you so much! I am looking forward to using it.