Change e letters to i in words: Difference between revisions
Content added Content deleted
(J) |
|||
Line 2,154: | Line 2,154: | ||
25. vector -> victor |
25. vector -> victor |
||
26. welles -> willis |
26. welles -> willis |
||
</pre> |
|||
=={{header|VBScript}}== |
|||
Run it in CScript. |
|||
<lang vb> |
|||
with createobject("ADODB.Stream") |
|||
.charset ="UTF-8" |
|||
.open |
|||
.loadfromfile("unixdict.txt") |
|||
s=.readtext |
|||
end with |
|||
a=split (s,vblf) |
|||
set d=createobject("scripting.dictionary") |
|||
redim b(ubound(a)) |
|||
i=0 |
|||
for each x in a |
|||
s=trim(x) |
|||
if len(s)>5 then |
|||
if instr(s,"i") then d.add s,"" |
|||
if instr(s,"e") then b(i)=s: i=i+1 |
|||
end if |
|||
next |
|||
redim preserve b(i-1) |
|||
for i=0 to ubound(b) |
|||
s=trim(b(i)) |
|||
s2=replace(s,"e","i") |
|||
if d.exists(s2) then |
|||
wscript.echo left(s& space(10),10) & "-> " & s2 |
|||
end if |
|||
next |
|||
</lang> |
|||
{{out}} |
|||
<pre> |
|||
analyses -> analysis |
|||
atlantes -> atlantis |
|||
bellow -> billow |
|||
breton -> briton |
|||
clench -> clinch |
|||
convect -> convict |
|||
crises -> crisis |
|||
diagnoses -> diagnosis |
|||
enfant -> infant |
|||
enquiry -> inquiry |
|||
frances -> francis |
|||
galatea -> galatia |
|||
harden -> hardin |
|||
heckman -> hickman |
|||
inequity -> iniquity |
|||
inflect -> inflict |
|||
jacobean -> jacobian |
|||
marten -> martin |
|||
module -> moduli |
|||
pegging -> pigging |
|||
psychoses -> psychosis |
|||
rabbet -> rabbit |
|||
sterling -> stirling |
|||
synopses -> synopsis |
|||
vector -> victor |
|||
welles -> willis |
|||
</pre> |
</pre> |
||