An Séimhiú agus an tUrú
In Irish Gaelic (Gaeilge) there are a number of ways that the start of a word can be changed. The most common of these are lenition (an séimhiú) and eclipsis (an t-urú)
Lenition involves adding the letter h as the second letter. For example, the word "bean" (woman) would be lenited to "bhean".
Eclipsing adds a prefix to the word. The prefix is determined by the first letter of the word. For example, the word "capall" (horse) starts with a c. Its eclipsis is g. So when the word "capall" is eclipsed it becomes "gcapall".
Challenge
Write a function or program that takes a word and returns both its lenited and eclipsed forms.
Lenition
Only words beginning with:
b
c
d
f
g
m
p
s
t
are lenited. Words beginning with other letters are not changed.
Some examples:
bean bhean
capall chapall
Sasana Shasana
lón lón
Ífreann Ífreann
Eclipsis
If a word starts with any of the following letters, it is prefixed by its respective eclipsis:
Letter Eclipsis
b m
c g
d n
f bh
g n
p b
t d
Words that don't start with those letters remain unchanged.
Examples:
bean mbean
capall gcapall
cailín gcailín
doras ndoras
fuinneog bhfuinneog
Gaeilge nGaeilge
Sasana Sasana
There are other changes that can happen to the start of a word, but we'll just focus on these ones.
Rules
The input is only one word. Words will only contain a-z
, A-Z
or the fada vowels á
, Á
, é
, É
, í
, Í
, ó
, Ó
, ú
and Ú
.
To make it a bit more simple the word itself doesn't necessarily need to be an Irish word, just that it is treated like one in the code. So inputting delta
should return dhelta
and ndelta
.
For this challenge you can assume that the input words have not already been lenited or eclipsed (in Irish, a word is only lenited or eclipsed once. You would never end up with "bhhean" or "ngcapall").
Standard rules apply, including the default I/O rules. Similarly, default loopholes are forbidden.
Finally, this is code-golf so shortest answer in bytes wins.
Test cases
Input Lenited Eclipsed
bean bhean mbean
capall chapall gcapall
fuinneog fhuinneog bhfuinneog
Sasana Shasana Sasana
Gaeilge Ghaeilge nGaeilge
lón lón lón
áthas áthas áthas
Ífreann Ífreann Ífreann
Ífreann
oráthas
. In those cases, however, you would not change the word. \$\endgroup\$ – Ciaran_McCarthy Jan 8 at 12:02