I would like to translate greek characters to their common latin equivalents for the purpose of full-text search.
Consider the following:
SELECT
to_tsvector('english', 'α-decay') @@ to_tsquery('α & decay') AS greek_greek,
to_tsvector('english', 'α-decay') @@ to_tsquery('a & decay') AS greek_latin_short,
to_tsvector('english', 'α-decay') @@ to_tsquery('alpha & decay') AS greek_latin_long;
greek_greek | greek_latin_short | greek_latin_long
-------------+-------------------+------------------
t | t | f
(1 row)
The long version does not match, but users expecting these symbols might type in alpha or beta instead of α and β. Is there a pre-defined dictionary which would automatically turn α into both 'a' and 'alpha'? If not, how can I make one? Or is there a better way altogether?