Class EmojiAnnotations

java.lang.Object
opennlp.tools.util.normalizer.EmojiAnnotations

public final class EmojiAnnotations extends Object
The bundled-facts layer of the emoji annotation record store: license-clean, provenance-tagged attributes intrinsic to a pictograph (name, coarse sentiment, entity type, document category), loaded once from the project-authored emoji-annotations.txt resource. Each row of that file is one attribute of one symbol (codepoints ; attribute ; value ; source ; notes), so every value carries its own provenance and adding an attribute later is new rows plus loader support instead of a file-format break. The loader fails loud on an unknown attribute or a malformed row: the data and the code move together, so an unrecognized attribute is corruption, not extensibility.

Data licensing: the name values are the CLDR short names and the entity-type/category values are derived from the group and subgroup headers of the upstream emoji-test.txt (UTS #51, Unicode License V3, see the NOTICE file); the sentiment scores are original project judgments tagged UNSPECIFIED. No third-party sentiment data set is copied; in particular the Emoji Sentiment Ranking (CC BY-SA) is not used in any form.

EmojiAnnotator is the accessor. Lookups strip U+FE0F (emoji presentation selector) because it does not change identity; bundled rows are keyed without it. Flag emoji have no bundled rows: region is derived, and gazetteer ids are never baked in.

  • Method Details