Find words which contain the most consonants: Difference between revisions
Content added Content deleted
(add RPL) |
|||
Line 3,998: | Line 3,998: | ||
done... |
done... |
||
</pre> |
|||
=={{header|RPL}}== |
|||
The only way to use <code>unixdict.txt</code> as input is to convert it into a list of 25104 strings. Fortunately, emulators can handle such a big data structure in RAM. |
|||
{{works with|Halcyon Calc|4.2.7}} |
|||
≪ → words ncons |
|||
≪ { } |
|||
1 words EVAL SIZE '''FOR''' j |
|||
words j GET |
|||
'''IF''' DUP SIZE 10 ≤ '''THEN''' DROP '''ELSE''' |
|||
{ 21 } 0 CON |
|||
1 3 PICK SIZE '''FOR''' j |
|||
OVER j DUP SUB |
|||
NUM R→B #DFh AND B→R CHR |
|||
'''IF''' "BCDFGHJKLMNPQRSTVWXYZ" SWAP POS '''THEN''' |
|||
LAST DUP2 GET 1 + PUT END |
|||
'''NEXT''' |
|||
1 SF |
|||
1 21 '''FOR''' j |
|||
'''IF''' DUP j GET 1 > '''THEN''' 1 CF 21 'j' STO '''END''' |
|||
NEXT |
|||
'''IF''' DUP 1 CON DOT ncons < 1 FC? OR '''THEN''' DROP '''ELSE''' + '''END''' |
|||
'''END NEXT''' |
|||
≫ ≫ ‘<span style="color:blue">CONSONANTS</span>’ STO |
|||
'Unixdict' 9 <span style="color:blue">CONSONANTS</span> |
|||
'Unixdict' 8 <span style="color:blue">CONSONANTS</span> |
|||
{{out}} |
|||
<pre> |
|||
2: { "comprehensible" } |
|||
1: { "administrable" "anthropology" "blameworthy" "bluestocking" "boustrophedon" "bricklaying" "chemisorption" "christendom" "claustrophobia" "compensatory" "comprehensive" "counterexample" "demonstrable" "disciplinary" "discriminable" "geochemistry" "hypertensive" "indecipherable" "indecomposable" "indiscoverable" "lexicography" "manslaughter" "misanthropic" "mockingbird" "monkeyflower" "neuropathology" "paralinguistic" "pharmacology" "pitchblende" "playwriting" "shipbuilding" "shortcoming" "springfield" "stenography" "stockholder" "switchblade" "switchboard" "switzerland" "thunderclap" } |
|||
</pre> |
</pre> |
||
Line 4,075: | Line 4,106: | ||
onomatopoeia |
onomatopoeia |
||
</pre> |
</pre> |
||
=={{header|TypeScript}}== |
=={{header|TypeScript}}== |
||
<syntaxhighlight lang="typescript"> |
<syntaxhighlight lang="typescript"> |