Post by tsh73 on Feb 12, 2019 8:06:56 GMT
In the avenue of "program resources supporting Just BASIC":
(for example - if one wants to check if his decoding effort produces some real words)
wiki.puzzlers.org/dokuwiki/doku.php?id=solving:wordlists:about:start
(found by searching for "unixdict.txt")
EDIT and I just used it
' "unixdict.txt"
'it is LF- delimited. Last word has LF after it too
'it is small enough to search in it with INSTR
open "unixdict.txt" for input as #1
dict$=input$(#1, lof(#1))
close #1
phrase$="Hello kitty, hello darling, hello SATOR" 'lst word is not in dictionary
print "source phrase:"
print ,phrase$
dim w$(100)
w$=""
n = 0
for i = 1 to len(phrase$)
c$=lower$(mid$(phrase$,i,1))
if asc(c$)>=ASC("a") and asc(c$)<=ASC("z") then
w$=w$+c$
else
if w$<>"" then 'skip extra spaces etc
n=n+1
w$(n)=w$
w$=""
end if
end if
next
if w$<>"" then
n=n+1
w$(n)=w$
end if
print "nTotWords ";n
nWords=0
for i = 1 to n
print i, ">";w$(i);"<",
if instr(dict$, chr$(10)+w$(i)+chr$(10)) then
nWords=nWords+1
print " exist in dictionary";
end if
print
next
print "nExistingWords ";nWords
print "% of Existing Words";nWords/n
Result:source phrase:
Hello kitty, hello darling, hello SATOR
nTotWords 6
1 >hello< exist in dictionary
2 >kitty< exist in dictionary
3 >hello< exist in dictionary
4 >darling< exist in dictionary
5 >hello< exist in dictionary
6 >sator<
nExistingWords 5
% of Existing Words0.83333333