Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,39 @@
/* NetRexx */
options replace format comments java crossref savelog symbols binary
unixdict = 'unixdict.txt'
do
wmax = Integer.MIN_VALUE
dwords = ArrayList()
inrdr = BufferedReader(FileReader(File(unixdict)))
loop label ln while inrdr.ready
dword = Rexx(inrdr.readLine).strip
if isOrdered(dword) then do
dwords.add(dword)
if dword.length > wmax then
wmax = dword.length
end
end ln
inrdr.close
witerator = dwords.listIterator
loop label wd while witerator.hasNext
dword = Rexx witerator.next
if dword.length < wmax then do
witerator.remove
end
end wd
dwords.trimToSize
say dwords.toString
catch ex = IOException
ex.printStackTrace
end
return
method isOrdered(dword = String) inheritable static binary returns boolean
wchars = dword.toCharArray
Arrays.sort(wchars)
return dword.equalsIgnoreCase(String(wchars))