bake omissions

master
Matthew Butterick 5 years ago
parent f63f9b7f86
commit 99c39d9f4a

@ -1,11 +0,0 @@
kcuf
tnuc
tihs
yssup
elohssa
kcoc
nmad
traf
gaf
tihs
reggin

@ -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

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

@ -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

Loading…
Cancel
Save