dict_roman
Full-text search dictionary that converts Roman numeral tokens to Arabic integers.
dict_roman · Full-text search dictionary that converts Roman numeral tokens to Arabic integers.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100288 | dict_roman | dict_roman | 1.0 | FTS | Unknown | C |
Usage
Sources:
dict_roman provides the roman full-text-search dictionary, which normalizes a Roman-numeral token to its Arabic-integer spelling. Use it when numerals such as XXIV should enter a text-search vector as 24 rather than as alphabetic text.
Core Workflow
Install the extension, then inspect the dictionary directly with ts_lexize:
To use the normalization during indexing and querying, map an appropriate token type in a text-search configuration:
The fallback dictionary in the mapping is important for ordinary alphabetic tokens that roman does not recognize.
Operational Notes
- The documented SQL surface is the
romandictionary; the upstream README demonstratests_lexizebut does not publish a complete grammar or accepted numeric range. - Test zero, subtractive notation, case, malformed input, and large values against the exact packaged build before relying on the normalized value.
- Changing a text-search configuration changes future parsing only. Rebuild stored
tsvectorvalues and dependent indexes when a new mapping must apply to existing rows.