Class NamedEntityEnricher
java.lang.Object
io.goobi.viewer.controller.model.alto.NamedEntityEnricher
- All Implemented Interfaces:
TextEnricher
TextEnricher implementation that wraps ALTO word tokens referenced by named-entity
tags in interactive HTML buttons. Each button carries data attributes for the entity type,
authority URI, and a pre-built search URL for further lookup.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NamedEntityEnricher
public NamedEntityEnricher()
-
-
Method Details
-
enrich
public String enrich(String content, de.intranda.digiverso.ocr.alto.model.structureclasses.lineelements.LineElement element) Wraps every word that references a named-entity tag in an interactive HTML button. Previously bounded to one enrichment per page-render by a deadMAX_ENRICHMENTSlimit (silently produced only a single button regardless of how many entities the page contained); the limit has been removed so all referencing words are enriched.- Specified by:
enrichin interfaceTextEnricher- Parameters:
content- the textual content of the word being enrichedelement- the ALTO line element whose word content is being processed- Returns:
- the enriched HTML button markup if the element is referenced by at least one
named-entity tag, otherwise the unchanged
contentstring
-