diff --git a/words/data/omit.rktd b/words/data/omit.rktd deleted file mode 100644 index 9c48f48..0000000 --- a/words/data/omit.rktd +++ /dev/null @@ -1,11 +0,0 @@ -kcuf -tnuc -tihs -yssup -elohssa -kcoc -nmad -traf -gaf -tihs -reggin \ No newline at end of file diff --git a/words/data/words.rktd b/words/data/words.rktd index 4be557e..c710cb4 100644 --- a/words/data/words.rktd +++ b/words/data/words.rktd @@ -38450,7 +38450,6 @@ cocircular cocircularity cocitizen cocitizenship -cock cockade cockaded Cockaigne @@ -48406,7 +48405,6 @@ Dammara damme dammer dammish -damn damnability damnable damnableness @@ -67891,7 +67889,6 @@ faeryland faff faffle faffy -fag Fagaceae fagaceous fagald @@ -67900,10 +67897,6 @@ Fagara fage Fagelia fager -fagger -faggery -fagging -faggingly fagine fagopyrism fagopyrismus @@ -124411,17 +124404,6 @@ niggardliness niggardling niggardly niggardness -nigger -niggerdom -niggerfish -niggergoose -niggerhead -niggerish -niggerism -niggerling -niggertoe -niggerweed -niggery niggle niggler niggling @@ -160443,7 +160425,6 @@ puss pusscat pussley pusslike -pussy pussycat pussyfoot pussyfooted diff --git a/words/index.rkt b/words/index.rkt index 017e833..f6e8a04 100644 --- a/words/index.rkt +++ b/words/index.rkt @@ -49,12 +49,9 @@ (define (make-word-recs) - (define reverse-string (compose1 list->string reverse string->list)) - (define omit-words (map reverse-string (file->lines "data/omit.rktd"))) (for/vector ([w (in-lines (open-input-file "data/words.rktd"))] #:when (and (not (regexp-match "'" w)) ; no apostrophes - (regexp-match #rx"^[A-Za-z]+$" w) ; no accented letters - (not (member w omit-words)))) ; no bad words + (regexp-match #rx"^[A-Za-z]+$" w))) (vector w (word->charidx w) (string-length w)))) diff --git a/words/main.rkt b/words/main.rkt index 97492e7..059f038 100644 --- a/words/main.rkt +++ b/words/main.rkt @@ -53,7 +53,7 @@ ;; maybe only proper names (if proper-names? (capitalized? word-charidx) (not (capitalized? word-charidx))) ;; maybe hide plurals - (if hide-plurals? (not (regexp-match #rx"s$" word)) #t))) + (if hide-plurals? (not (regexp-match #rx"s$" word)) #true))) (values (cons (capitalizer word) word-acc) (add1 count)))) (module+ test