Conversation
| next_letter = random.choices( | ||
| list(self.corpus.occurences[last_bigram]), | ||
| weights=self.corpus.occurences[last_bigram].values())[0] | ||
| try: |
There was a problem hiding this comment.
it's possible to test this by using a corpus with one bad word and one good word in it. run it a couple of dozen times and verify that it only ever generates the good word.
|
There's a bunch of random crap you have to do if you want to make a release - but we can do that at a different time. |
| @@ -0,0 +1,47 @@ | |||
| anal | |||
There was a problem hiding this comment.
I dunno how I feel about having this list committed to github. 😬
| word += next_letter | ||
|
|
||
| if word in self.blacklist: | ||
| word = random.choices( |
There was a problem hiding this comment.
Feels like we could just put this in a loop with a retry rather than repeating the call?
|
@stephenprater and @AndrewScibek is this still a valid PR? I thought the blacklist was already in place, but not 100% |
|
@corbinlc kinda but there are a lot of issues with it as pointed out by prater |
What changes does this PR introduce?
Added a blacklist for words being created.
Where should the reviewer start?
By closing their eyes until after the blacklists/en file
Has this been manually tested? How?
136843250 words without a bad word found or a crash. I dont have until the heat death of the universe to find a bad word
What GIF best describes this PR or how it makes you feel?