Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: entity tag color scheme #180

Closed
pirolen opened this issue Oct 5, 2021 · 5 comments
Closed

Question: entity tag color scheme #180

pirolen opened this issue Oct 5, 2021 · 5 comments
Assignees

Comments

@pirolen
Copy link

pirolen commented Oct 5, 2021

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
Copy link
Owner

proycon commented Oct 5, 2021

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).

@proycon proycon self-assigned this Oct 5, 2021
@pirolen
Copy link
Author

pirolen commented Oct 6, 2021

Thank you, would be great!

@proycon proycon added the to do label Oct 6, 2021
@pirolen
Copy link
Author

pirolen commented Oct 6, 2021

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 added a commit that referenced this issue Oct 8, 2021
proycon added a commit that referenced this issue Oct 8, 2021
@proycon
Copy link
Owner

proycon commented Oct 8, 2021

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.

@proycon proycon added ready and removed to do labels Oct 8, 2021
@pirolen
Copy link
Author

pirolen commented Oct 8, 2021

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

@proycon proycon closed this as completed Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants