From 1d2814738b8ce6cb2930c22eebeed1c4cb3ed63b Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Fri, 8 Sep 2023 10:55:42 +0100 Subject: [PATCH] Removed neighbour generation out of the core library --- riddle_definitions.md | 13 ------------- 1 file changed, 13 deletions(-) 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. -- 2.34.1