Knoware.no

Anything QL Software or Programming Related.
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post 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.)


Per
dont be happy. worry
- ?
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Knoware.no

Post 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.
wordlist.gz
(6.99 KiB) Downloaded 77 times


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Knoware.no

Post 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)


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post 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.


Per
dont be happy. worry
- ?
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post by pjw »

Theres been some movement on the Knoware scene. See Changes for details.
Important bug fix for anyone who downloaded EDLINE%!


Per
dont be happy. worry
- ?
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Knoware.no

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post 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 ;)


Per
dont be happy. worry
- ?
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Knoware.no

Post 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...


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Knoware.no

Post 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.


Per
dont be happy. worry
- ?
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Knoware.no

Post 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.


Post Reply