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
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.