-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi again,
in the use of this wonderful implementation of your program, I spotted a behavior which someone (depends on who), could consider erratic.
Of course, it is comprehensible that the management of this letter represents a challenge as it arise mostly of foreign terms. Nevertheless, in the cases that I will present here, I believe there is an easy, simple and non-debatable way of syllabify these words, even in the case where the pronunciation is borrowed from other language too.
Note: DRAE stands for Diccionario de la Real Academia Española (some of the terms have an alternative writing adapted to the Spanish language, like bypass (baipás) or curry (curri) ).
First we have the errors raised when the 'y' is in the middle of two consonants:
pylabeador.syllabify('Tytonidae') #Family of birds, could have use Tyto too
Traceback (most recent call last):
...
raise HyphenatorError("Nucleus expects a vowel!", word)
...
pylabeador.syllabify('bypass') #Appears in DRAE
raise HyphenatorError("Nucleus expects a vowel!", word)
pylabeador.syllabify('byroniano') #Appears in DRAE
raise HyphenatorError("Nucleus expects a vowel!", word)
On the other hand we have (this one, I reckon, could use a debate)
pylabeador.syllabify('byte') #Appears in DRAE
raise HyphenatorError("Nucleus expects a vowel!", word)
Yes, but one may think that only one syllable pronounced like 'bait'
(in Spanish), is the correct way to proceed. My personal point of view is that this 'y' should behave like an 'i' and in Spanish, two syllables arises.
Second, its behaviour when proceeded of 'rr':
pylabeador.syllabify('curry') #Appears in DRAE
['cur', 'ry']
Which, I do not know, could be related to...
Third:
pylabeador.syllabify('cónyuge') #Appears in DRAE, very common word
['có', 'nyu', 'ge']
It is interesting that this one, possibly due to the presence of two strong vowels 'oa', works fine since the hyphenation was broken in such a way that it matches a vowel each consonant (d and y):
pylabeador.syllabify('coadyuvar') #Appears in DRAE
['co', 'ad', 'yu', 'var']
I excuse myself for not providing better explanations of the observed behaviour. I hope that this examples could be helpful for you.
Thank you very much for your work,
M.