Why Semantic Attributes?
Many languages have grammatical gender agreement. Without knowing the gender of a person, translation quality suffers:Enable Semantic Enrichment
Semantic Attributes
Person Gender
| Attribute Value | Meaning | Example Names |
|---|---|---|
gender="male" | Masculine name | John, Michael, Hans |
gender="female" | Feminine name | Maria, Sarah, Anna |
gender="neutral" | Ambiguous/unknown | Alex, Jordan, Sam |
Location Scope
| Attribute Value | Meaning | Examples |
|---|---|---|
scope="city" | City/town | Berlin, Paris, Tokyo |
scope="country" | Country | Germany, France, Japan |
scope="region" | Region/state | Bavaria, California, Hokkaido |
Semantic Data
Semantic enrichment uses lookup databases (~12 MB total):- Name database: First names with gender associations
- Location database: Cities, countries, regions with classifications
First-Use Download
Manual Data Management
Title Extraction
When semantic enrichment is enabled, honorific titles are extracted and kept visible:- Academic: Dr., Prof., PhD
- Honorific: Mr., Mrs., Ms., Miss
- Professional: Rev., Hon.
- German: Herr, Frau, Dr.
- French: M., Mme., Mlle.
- And many more…
Locale Hints
Improve detection accuracy with locale hints:- Name gender inference (culture-specific names)
- Title recognition (Mr. vs Herr vs M.)
Configuration Options
Cache Locations
Semantic data is cached locally:Node.js
| Platform | Location |
|---|---|
| macOS | ~/Library/Caches/rehydra/semantic-data/ |
| Linux | ~/.cache/rehydra/semantic-data/ |
| Windows | %LOCALAPPDATA%/rehydra/semantic-data/ |
Browser
Uses IndexedDB for cross-session persistence.Use Cases
Machine Translation
Machine Translation
German, French, Spanish, and many other languages have grammatical gender. Semantic attributes help MT systems:
Location Prepositions
Location Prepositions
Different location types use different prepositions:The
scope attribute helps translation systems choose correctly.Contextual Processing
Contextual Processing
Beyond translation, semantic attributes enable:
- Gender-aware text generation
- Location-based content filtering
- Name normalization