Setting label values (by Groovy script)

For example I want add label NEWS_ITEM ta a page which has following span tag:

News item

Or in Swedish:

Pressmeddelande

Because we have pages in different languages, we have to convert those texts in to labels.

News item → NEWS_ITEM
Pressmeddelande → NEWS_ITEM

I can extract this tag text into new field. But then I would need something similar than Doc Boost.
Groovy script where I can access all document fields and convert those values into label values.

The simple way may be to create a fess-ingest plugin.
The example implementations are fess-ingest-ndjson and fess-ingest-logger.
If you need more development support, please contact commercial support.

Thank you for you help.
I will try with the plugin.