26 ms·
Sometimes. Which is actually part of why I clicked into the article - I expected it to get into the complexity of trying to detect if 'y' was a vowel as part o
by horsawlarway 1y ago
Sometimes.
Which is actually part of why I clicked into the article - I expected it to get into the complexity of trying to detect if 'y' was a vowel as part of the search, and instead got a mostly banal python text search article.
You can see the technical rules for when 'Y' is a vowel in english here:
https://www.merriam-webster.com/grammar/why-y-is-sometimes-a-vowel-usage#:~:text=Y%20is%20considered%20to%20be,a%20syllable%3A%20system%2C%20borborygmus. https://www.merriam-webster.com/grammar/why-y-is-sometimes-a...
Y is considered to be a vowel if…
The word has no other vowel: gym, my.
The letter is at the end of a word or syllable: candy, deny, bicycle, acrylic.
The letter is in the middle of a syllable: system, borborygmus.
- lcnPylGDnU4H9OF 1y agoI dunno about those rules; there are exceptions. Yttrium. Yggdrasil. Probably others, but those from off the top of my head. I think the best way to define when Y is a vowel is when it's not a consonant. Basically, if you make the sound that Y represents in the word "yes", it's a consonant. Otherwise, it's a vowel. (At least, no exceptions come to mind.)
- DougN7 1y agoWow, how would you code that?!
- lcnPylGDnU4H9OF 1y agoHeh, good question. I’d probably use a heuristic like what’s discussed in this thread and hope that it works. :D