Changing text color/style in ner.manual

Just added support for a style key on the tokens to the latest Prodigy nightly (it made more sense to do it there, since it already refactors a bunch of stuff around the internal token representation in the app).

So you can now do something like this and provide CSS overrides in camel-case:

{
    "text": "In Mumbai, police arrested protestors and fired teargas at activists.",
    "tokens": [
        {"text": "In", "start": 0, "end": 2, "id": 0, "style": {"color": "blue", "borderBottom": "5px solid red"}}, 
        ...
    ]
}

Edit: Now shipped in Prodigy v1.11!

2 Likes