Skip to content

Commit

Permalink
Collapse module hierarchy to avoid import minpair.minpair
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonlim-hs committed Sep 21, 2019
1 parent 31071d8 commit 5b88f5d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ Generate minimal pairs (and minimal sets).
> In phonology, minimal pairs are pairs of words or phrases in a particular language, spoken or signed, that differ in only one phonological element
>
> -- <cite>https://en.wikipedia.org/wiki/Minimal_pair</cite>
```
>>> import minpair
>>> minpair.vowel_minpair(['AE', 'EH'])
[{'AE': 'al', 'EH': 'l'}, {'AE': 'axe', 'EH': 'x'}, {'AE': 'bad', 'EH': 'bed'}, {'AE': 'bag', 'EH': 'beg'}]
```
2 changes: 2 additions & 0 deletions minpair/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = '0.1.0'

from .minpair import *
2 changes: 1 addition & 1 deletion minpair/minpair.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from . import arpabet
from collections import defaultdict
from minpair import arpabet
from nltk import download as nltk_download
from nltk.corpus import brown
from nltk.corpus import cmudict
Expand Down
2 changes: 1 addition & 1 deletion tests/test_minpair.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from minpair import minpair
import minpair
import pytest


Expand Down

0 comments on commit 5b88f5d

Please sign in to comment.