Removed neighbour generation out of the core library
[riddle-generator.git] / riddle_definitions.md
index a9242f362736e34ad44c42aa259e1952705d1e4e..1db01f7b1bcc338759f74ee6f8e6a9569b2622e3 100644 (file)
@@ -6,17 +6,13 @@ jupyter:
       extension: .md
       format_name: markdown
       format_version: '1.3'
-      jupytext_version: 1.15.0
+      jupytext_version: 1.14.5
   kernelspec:
     display_name: Python 3 (ipykernel)
     language: python
     name: python3
 ---
 
-# Definitions generally useful for the riddle solver
-
-While this file is here as a Markdown file, it's intended that Jupytext will save this file as a "percent" Python file, so that it can be imported by other notebooks here.
-
 ```python
 import unicodedata
 import re
@@ -125,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.