From: Neil Smith Date: Fri, 8 Sep 2023 09:55:42 +0000 (+0100) Subject: Removed neighbour generation out of the core library X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=refs%2Fheads%2Fmain;p=riddle-generator.git Removed neighbour generation out of the core library --- diff --git a/riddle_definitions.md b/riddle_definitions.md index da25f92..1db01f7 100644 --- a/riddle_definitions.md +++ b/riddle_definitions.md @@ -121,19 +121,6 @@ def edit_distance(s: str, t: str) -> int: return res ``` -```python -dictionary_neighbours = { - w: [o for o in dictionary - if edit_distance(w, o) <= 5 - if not set(w) <= set(o) - if not set(o) <= set(w)] - for w in dictionary} - -dictionary_neighbours = {w: ns - for w, ns in dictionary_neighbours.items() - if ns} -``` - ```python def collapse_riddle_clues(elems : Riddle) -> RiddleElems: """Combine the two parts of a riddle line into one element for solving.