Metadata-Version: 2.1
Name: recurse-words
Version: 0.2.1
Summary: find words that have other words in them that when you take the inner words out what's left is still a word
Home-page: https://github.com/sneakers-the-rat/recurse-words
License: Unlicense
Author: sneakers-the-rat
Author-email: JLSaunders987@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Provides-Extra: docs
Requires-Dist: autodocsumm (>=0.2.2,<0.3.0); extra == "docs"
Requires-Dist: datashader (>=0.12.1,<0.13.0)
Requires-Dist: furo (>=2021.4.11-beta.34,<2022.0.0); extra == "docs"
Requires-Dist: holoviews (>=1.14.3,<2.0.0)
Requires-Dist: ipykernel (>=5.5.3,<6.0.0)
Requires-Dist: networkx (>=2.6.3,<3.0.0)
Requires-Dist: pygraphviz (>=1.7,<2.0)
Requires-Dist: requests (>=2.25.1,<3.0.0)
Requires-Dist: scikit-image (>=0.18.1,<0.19.0)
Requires-Dist: sphinx (>=3.5.4,<4.0.0); extra == "docs"
Requires-Dist: tqdm (>=4.60.0,<5.0.0)
Requires-Dist: wheel (>=0.36.2,<0.37.0)
Project-URL: Repository, https://github.com/sneakers-the-rat/recurse-words
Description-Content-Type: text/markdown

[![Documentation Status](https://readthedocs.org/projects/recurse-words/badge/?version=latest)](https://recurse-words.readthedocs.io/en/latest/?badge=latest)

# recurse-words
find words that have other words in them that when you remove the inner word what's left is still a word

![An example word tree of such a kind](examples/img/collaborationists.png)

and do other stuff too like evaluate the modular phonetic structure of English like

```python
from recurse_words import Graph_Recurser, Graph
recurser = Graph_Recurser('phonetic_common')
recurser.recurse_all_words(
    min_include_word = 3,
    min_test_word    = 2,
    min_clipped_word = 2
)
Graph(recurser).render_graph('img').save('/some/path.png')
```

![The replacement, addition, and subtraction structure of the phonetic transcription of the 10,000 most common english words](docs/img/shader_phonetic_common_smol.png)

# [docs are here!!!](https://recurse-words.readthedocs.io/en/latest/)

main docs at https://recurse-words.readthedocs.io/
```
   ______________________________
 / \                             \.
|   |      p l e s               |.
 \_ |        t a k e             |.
    |          n o t e           |.
    |     -------------------    |.
    |                            |.
    |     this software is       |.
    |     developed expressly    |.
    |     for the purpose of     |.
    |     "funzies"              |.
    |                            |.
    |     i make no promises     |.
    |     that it works          |.
    |     or is good             |.
    |                            |.
    |   _________________________|___
    |  /                            /.
    \_/dc__________________________/.
```

# installation

From pypi:

```
pip install recurse-words
```

From github:

```
git clone https://github.com/sneakers-the-rat/recurse-words
pip install ./recurse-words
# or
poetry install ./recurse-words
```

# usage

Point the recurser at a file that has a list of words,
for example [this one](https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt), 
and let 'er rip

```python
from recurse_words import Recurser

recurser = Recurser('path/to/some/words.txt')
recurser.recurse_all_words()
recurser.save('word_trees.pck')

# see word trees by a few metrics
# max tree depth
recurser.by_depth
# total number of leaves
recurser.by_leaves
# total number of edges
recurser.by_density
```

Draw network graphs!

```python
recurser.draw_graph('some_word', '/output/directory')
```

Auto-download different corpuses!

```python
recurser = Recurser(corpus='english')
recurser = Recurser(corpus='phonetic')
```


