Commit 94a1eea
New reverse-existence implementation (#1370)
* added reverse existence with some basic tests for top1000 words
* added elementary words, docstrings,summary,sources, tests, and linting fixes
* Rename "reverse_existence" checks to "restricted"
Also, factor out word lists into module-level variables, for
access from elsewhere.
* tools: New reverse_existence_check implementation
Searches for all (3+-character) words using a simple regexp, then
walks the `finditer()` of non-overlapping matches, does some
sanity-checking on the candidate string (no digits), and queues
an error unless it appears on the list of permitted words.
* Simplify allowed_word helper
* Format list comprehension comprehensibly
* Switch to CSV for restricted wordlists
* Py3.8 balks at type annotation
* More terse set-conversion code
* Reformat CSV files to one-word-per-line
* chore: crlf -> lf
* refactor: replace csv library with simple read
* style: apply lint
* docs: update error message for restricted.top1000
---------
Co-authored-by: vqle <vqle@umich.edu>
Co-authored-by: Nytelife26 <xtylerjrx@gmail.com>1 parent f01742d commit 94a1eea
File tree
11 files changed
+2022
-2
lines changed- proselint
- checks/restricted
- tests
11 files changed
+2022
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments