Page 20 of 28
Re: Knoware.no
Posted: Sun Mar 13, 2022 5:03 pm
by pjw
tofro wrote:<>
Code: Select all
aspell dump master de_DE |grep '^[a-z]\{5\}/'|cut -d / -f 1|sort>wordlist
Sorry tofro, I couldnt get it to work. (Im using the official Ubuntu distro.) There is no output whatsoever after
Code: Select all
aspell dump master de_DE |grep '^[a-z]\{5\}/'>wordlist
If I remove the final / I get a file full of lowercase words, but of all different lengths. I even spent an hour reading up on grep, but I found nothing to help me in this context. What am I missing?
PS I didnt use de_DE but en_UK or whatever (I forget the name, I dont have it in front of me.)
Re: Knoware.no
Posted: Sun Mar 13, 2022 5:37 pm
by tofro
Interesting. I tried the same line on my Raspberry Pi (Raspian), which is about the same Debian than Ubuntu - And it works.
Code: Select all
aspell dump master de_DE |grep '^[a-z,A-Z]\{5\}/'|cut -d / -f 1|sort>wordlist
aspell dump master de_DE
dumps the complete dictionary.
grep '^[a-z,A-Z]\{5\}/'
finds lines that start with 5 alpha characters delimited by "/" (This is how aspell seems to mark metadata for the word)
cut -d / -f 1
assumes the line is a table split by "/" and outputs the first field (the base word) - Should work on your install just as well as on mine. You can extend the search to words whithout metadata by replacing the "/" with a "$".
Anyways, please find attached a list of words produced that way.
Re: Knoware.no
Posted: Sun Mar 13, 2022 5:57 pm
by tofro
I think I have the problem: The "/" metadata separation that i had to fiddle with in my German dictionary seems to only be present in
some aspell dictionaries. For the ones that don't happen to have this, (my en_UK dictionary is one such example, and yours somehow seems to be another),
Code: Select all
aspell dump master|grep '^[a-z,A-Z]\{5\}$' >wordlist
is just fine (for an English wordlist, you might want to leave off the ",A-Z" part to exclude proper names)
Re: Knoware.no
Posted: Sun Mar 13, 2022 7:25 pm
by pjw
Hurray!
Code: Select all
aspell dump master en_GB|grep '^[a-z]\{5\}$'|cut -d / -f 1|sort>enGB
did the trick!
And thanks for the word list. Im not sure I can use it though as it would need some curation. German word lengths tend to be relatively long, I think, so a six-letter word list (lower case only for WQRDLI) would probably be a better fit. However, I can fix that myself, or leave it up to the user(s) if any.
Re: Knoware.no
Posted: Tue Apr 05, 2022 12:05 pm
by pjw
Theres been some movement on the Knoware scene. See
Changes for details.
Important bug fix for anyone who downloaded EDLINE%!
Re: Knoware.no
Posted: Tue Apr 05, 2022 3:00 pm
by tofro
The most stylish method to create word lists, is of course, asking the SPELL device on the QL directly (Why refer to Linux if you can do the same thing on a proper computer...).
(This is also an example on how you use it: You simply print the word you try to check to a channel opened to the device, and will receive a "BAD PARAMETER" in case the word is completely wrong or a "NOT COMPLETE" if what you have submitted is the start of a valid word, but still missing characters - or, of course, OK if the word was correctly spelled.)
The program takes a while to run (think: hours, because it scans all 6-character permutations for validity), and could profit from Char FOR loops, but produces an impressive word list.
Code: Select all
100 WHEN ERRor
105 validWord = 0
110 CONTINUE
120 END WHEN
130 :
135 Scandict 6
137 :
140 DEFine PROCedure Scandict (n)
150 LOCal try$(n), splChan
160 splChan = FOPEN ("SPELL")
170 IF splChan < 0 THEN
180 PRINT #0;"Could not open spell device"
190 RETurn
200 END IF
210 :
220 try$= "aaaaaa"
230 :
240 FOR a = CODE('a') TO CODE('z')
250 try$(1) = CHR$(a)
260 FOR b = CODE('a') TO CODE('z')
270 try$(2) = CHR$(b)
280 FOR c = CODE('a') TO CODE('z')
290 try$(3) = CHR$(c)
300 FOR d = CODE('a') TO CODE('z')
310 try$(4) = CHR$(d)
320 FOR e = CODE('a') TO CODE('z')
330 try$(5) = CHR$(e)
340 FOR f = CODE('a') TO CODE('z')
350 try$(6) = CHR$(f)
355 validWord = 1
360 PRINT #splChan,try$
370 IF validWord = 1 THEN
380 PRINT try$
390 END IF
400 END FOR f
410 END FOR e
420 END FOR d
430 END FOR c
440 END FOR b
450 END FOR a
455 CLOSE #splChan
460 END DEFine
Re: Knoware.no
Posted: Tue Apr 05, 2022 5:06 pm
by pjw
tofro wrote:The most stylish method to create word lists, is of course, asking the SPELL device on the QL directly<>
I agree! I think you may have missed my
QTYPextract_bas, on the same page as the dictionary downloads, which does exactly that, albeit in a, er, more straightforward way.. - a matter of seconds, I think, even on a QL.
QTYP came with three dictionaries: English, French and German. Geoff Wicks provided a few more, like Dutch. So anyone with QTYP should be well enough provided for.
PSST! I believe the WORDLE craze has just about blown over, so it should be safe to come out of your bunkers and try
WQRDLI now, guys

Re: Knoware.no
Posted: Tue Apr 05, 2022 5:14 pm
by tofro
pjw wrote:tofro wrote:The most stylish method to create word lists, is of course, asking the SPELL device on the QL directly<>
I agree! I think you may have missed my
QTYPextract_bas, on the same page as the dictionary downloads, which does exactly that, albeit in a, er, more straightforward way.. - a matter of seconds, I think, even on a QL.
QTYP came with three dictionaries: English, French and German. Geoff Wicks provided a few more, like Dutch. So anyone with QTYP should be well enough provided for.
PSST! I believe the WORDLE craze has just about blown over, so it should be safe to come out of your bunkers and try
WQRDLI now, guys

I missed that indeed. What I also miss is, however, my QTYP manual (that one got lost in the mists of time...), so I might not have found the most optimal way (I'm being very generous to me, here

) to extract the words in a timely manner...
Re: Knoware.no
Posted: Tue Apr 05, 2022 6:25 pm
by pjw
tofro wrote:pjw wrote:tofro wrote:The most stylish method to create word lists, is of course, asking the SPELL device on the QL directly<>
I agree! I think you may have missed my
QTYPextract_bas, on the same page as the dictionary downloads, which does exactly that <>
I missed that indeed. What I also miss is, however, my QTYP manual (that one got lost in the mists of time...), so I might not have found the most optimal way (I'm being very generous to me, here

) to extract the words in a timely manner...
The basis of that script was written back when I first got QTYP - and had the manual, and was playing with it as one did with expensive, shiny new software

Given the examples provided in the manual a program to extract all the words pretty much suggested itself.
In case youre interested there is a scanned manual out there somewhere. Sadly, the quality is pretty poor and badly in need of a do-over.
Re: Knoware.no
Posted: Tue Apr 05, 2022 7:25 pm
by dilwyn
Some time ago, I scanned, OCRed and preserved my tatty old copy of QTYP manual with QTYP II supplement. Handy having a backup copy of the old commercial manuals.