Skip to content

Commit 1ea9e49

Browse files
authored
Merge pull request #43 from UBC-MDS/test_get_n_guesses
Test get n guesses
2 parents ba72f69 + a616e2a commit 1ea9e49

File tree

4 files changed

+1038
-16
lines changed

4 files changed

+1038
-16
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,25 @@ $ pip install git+https://github.com/UBC-MDS/wordguess.git
2828
To use `wordguess` in your code:
2929

3030
```python
31-
>>> import wordguess
32-
>>> wordguess.get_result("spark", "spoon")
31+
>>> from wordguess.get_result import get_result
32+
>>> get_result("spark", "spoon")
33+
```
34+
35+
```python
36+
>>> from wordguess.get_n_guesses import get_n_guesses
37+
>>> from wordguess.get_result import get_result
38+
>>>
39+
>>> result_hist = {}
40+
>>> for word in ['whelp','might','madam']:
41+
>>> result_hist[word] = get_result('major',word)
42+
>>> get_n_guesses(result_hist, n=10)
3343
```
3444

3545
## Dataset & user functions
3646

3747
* Dataset: `minidict` (*list*)
3848
* **Location:** `/src/wordguess/_internals.py`
39-
* **Description:** A default list of 100 common English words, each five letters in length. This serves as the fallback `corpus` for all functions unless a custom list is provided.
49+
* **Description:** A default list of more than 600 valid and non-valid English words, each five letters in length. This serves as the fallback `corpus` for all functions unless a custom list is provided.
4050

4151
* `get_result(target, guess, corpus=minidict)`
4252
* **Location:** `/src/wordguess/get_result.py`

0 commit comments

Comments
 (0)