An algorithm for an article | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

An algorithm for an article

Hi, I need an algorithm for calculating the indefinite article for an English noun. Ape => an ape Unicorn => a unicorn X-ray => an X-ray

29th Aug 2020, 8:25 AM
Jegors Čemisovs
Jegors Čemisovs - avatar
1 ответ
+ 5
Jegors Čemisovs , just follow the rules how to select "a" or "an" in English. Check what is the first letter of the string and depending on that add the appropriate article.
29th Aug 2020, 8:29 AM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar