-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7b2cc0
commit 7973b14
Showing
1 changed file
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
# Minpair | ||
|
||
Generate minimal pairs (and minimal sets). | ||
Generate minimal pairs (and minimal sets) for US English words. | ||
|
||
> 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']) | ||
>>> minpair.vowel_minpair(['AE', 'EH'])[:4] | ||
[{'AE': 'al', 'EH': 'l'}, {'AE': 'axe', 'EH': 'x'}, {'AE': 'bad', 'EH': 'bed'}, {'AE': 'bag', 'EH': 'beg'}] | ||
``` | ||
|
||
# Installation | ||
|
||
``` | ||
pip install minpair | ||
``` | ||
|
||
# Dependencies | ||
|
||
## NLTK | ||
|
||
This package depends on a few NLTK's corpora, namely: _brown_, _cmudict_, _universal_tagset_, and _words_ corpus. | ||
This package will download these corpora into [NLTK data directory](https://www.nltk.org/data.html#command-line-installation) if not available. |