Find words with alternating vowels and consonants: Difference between revisions

→‎AppleScript :: Idiomatic: Removed editorial content on other drafts. See discussion.
(Added Prolog Solution)
(→‎AppleScript :: Idiomatic: Removed editorial content on other drafts. See discussion.)
Line 88:
=={{header|AppleScript}}==
===Idiomatic===
The handler here is case- and diacritical-insensitive and has an option to treat "y" as a vowel. With the text file located on the computer's startup disk, it performs the set task in just under a third of a second on my machine, which is probably good enough for such a silly task. However, the "Functional" script beneath it — although going to great lengths (!) to disguise how it works and how to use it (the text file has to be in the same folder as the compiled script file), performing a strictly lower-case search (easily fixed by starting the regex with "(?i)"), and assuming the text file has just one word per linefeed-delimited line — is just over ten times as fast, including additional time spent formatting the output for display!
 
<lang applescript>(*
Line 146:
{{output}}
<lang applescript>{"aboriginal", "apologetic", "bimolecular", "borosilicate", "calorimeter", "capacitate", "capacitive", "capitoline", "capitulate", "caricature", "cohomology", "colatitude", "coloratura", "colorimeter", "debilitate", "decelerate", "decolonize", "definitive", "degeneracy", "degenerate", "dehumidify", "deliberate", "demodulate", "denominate", "denotative", "depositary", "depository", "deregulate", "deregulatory", "derogatory", "desiderata", "desideratum", "dicotyledon", "dilapidate", "diminutive", "epigenetic", "facilitate", "generosity", "hemosiderin", "hereditary", "heretofore", "heterodyne", "hexadecimal", "homogenate", "hypotenuse", "inoperative", "judicatory", "judicature", "laboratory", "latitudinal", "latitudinary", "legitimacy", "legitimate", "lepidolite", "literature", "locomotive", "locomotory", "luminosity", "manipulate", "metabolite", "mineralogy", "monocotyledon", "musicology", "nicotinamide", "numerology", "oratorical", "paragonite", "paramilitary", "pejorative", "peridotite", "peripatetic", "polarimeter", "polymerase", "pyrimidine", "pyroxenite", "recitative", "recuperate", "regulatory", "rehabilitate", "rejuvenate", "remunerate", "repetitive", "repository", "reticulate", "revelatory", "savonarola", "similitude", "solicitude", "solidarity", "tananarive", "telekinesis", "teratogenic", "teratology", "topologize", "toxicology", "unilateral", "unimodular", "uninominal", "verisimilitude", "veterinary", "vocabulary"}</lang>
 
 
===Functional===
9,655

edits