Pig Latin Maybe Missing Test for Word without Vowels

I think a test can be added for the case of a word which has no vowels (I am not sure if English has one such word).

I submitted a solution that passes the tests, but it returns “nthnthay” for the input {“phrase”: “nth”}.

Maybe it would be nice to have a test for the case.

Hi @oezg :wave: Welcome back!

According to Wikipedia, there are very few words in English without vowels. If you omit acronyms or shortened words, there appears to be only one of any real length: tsk-tsks or tsktsks, which is more an exclamation or slang word than a general-usage one - as are all of the other ones listed in the article (Mmm, Grr, Brr, etc.).

nth is … not technically a general-use word, more of a mathematical “special” word, despite the example there.

So I think I would not be in favor of adding either one. But I’ll let other maintainers weigh in on it as well . :slightly_smiling_face:

Hi @BethanyG thank you for your answer and I agree with your answer. English language does not apparently have any meaningful words without vowels. My consideration was more of a theoretical nature than practical. It can well be left to the programmers to deal with that case individually.

English language does not apparently have any meaningful words without vowels.

That is not what was said, and is wrong, as you can see from the following full of meaning story in a sentence. (Credit given for using “apparently” for sure!)

Slyly, according to the myth, the nymph and sylph, were arranging a tryst, wryly in a crypt with a xyst.

Yes - if you count y as a consonant and not a vowel. Sadly, it is in between, which can make the rules of Pig-Latin complicated.

But I don’t know that debating that yet again for this exercise makes sense, and Rule 4 in the exercise instructions seems to (mostly) cover the y scenarios.

The question was weather or not we should add a test case that is a non-y, non-vowel word. (at least that is how I interpreted it).

1 Like

The “tsk” (and variances) and “brrr” examples are in my experience the most common occurrences of “constant only words” (without “y”) in the English language. And I think the exercise stands well without consideration of these exceptional words.

But to state that there is not a single word in the English language is not true, and should not be taken as the message from what was stated.

Again, I think the exercise stands well, without consideration of a minority of words being addressed. (It can be an interesting mentoring topic, though.)

I don’t see anybody stating that.

Suggesting Exercise Improvements | Exercism's Docs indicates we should only add a test case if it makes a substantial difference. This edge case affects less than 40 words out of at least 470,000 English words (according to an estimate at How many words are there in English? | Merriam-Webster) so I’m not in favor of changing the test suite at this time.

I don’t see anybody stating that.

Totally valid, I did paraphrase a bit, as the statement was “does not apparently have any meaningful words without vowels”.

I interpreted “does not have any meaningful words with out vowels” as “not even a single one”. I thought “does not have any” meant “not a single one”, with the qualification of “apparently” and also “without vowels”.

It was not really meant to be aggressive, just that it was not as bad as potentially stated, even though the doubt was indicated by “apparently”.

But I do agree that the change is not likely warranted as a core part of the exercise.

My question was

whether or not we should add a test case that is a non-y, non-vowel word.

In the light of this discussion, I am also not in favor of changing the test-suite.

2 Likes