Skip to main content

Module entity

Module entity 

Source
Expand description

Named entities — a structured extension of the glossary for characters, places, and named items whose grammatical gender matters in the target language.

Glossary terms enforce a source → target substitution; entities go further and tell the model how to inflect adjectives and articles around the translated name. The rendered block reads like a grammatical-agreement table (see render_entity_agreement_block), so the model can keep gender concord consistent across paragraphs.

Italian, French, Spanish, German, etc. all need this; English doesn’t. The feature is purely additive — empty input produces an empty block.

Structs§

Entity

Enums§

EntityGender

Functions§

entities_fingerprint
Stable fingerprint of a merged entity set. Empty input still produces a stable fingerprint so the cache namespace can ignore-or-include uniformly.
merge_scope_entities
Merge entities across scopes with the same book > series > global precedence as glossary terms. Entities are keyed on (source_name, source_language, target_language); the highest- priority row wins.
render_and_fingerprint
Convenience: produce both the rendered block and the fingerprint from a single merge.
render_entity_agreement_block
Render merged entities as a grammatical-agreement block. Empty input returns an empty string so the placeholder substitutes to nothing in templates that don’t reference the table.