Phonotactic generalization using recombination
Project description
Introduction
This library is meant to supplement the presentation Phonotactic well-formedness is recombinant, given at the 55th Annual Meeting of the SLE.
It learns typologically diverse phonotactics from positive examples alone.
Installation
pip install recombinant
Example
Here, we generalize the set /miememei, oumumo, momomu, iememi/ and then elicit ratings for /meem, memo, mumo/.
from recombinant import Learner
L = Learner([
'miememei',
'oumumo',
'momomu',
'iememi',
])
L.optimize()
print(L.rate('meem')) # => 0.4873949579831933
print(L.rate('memo')) # => 0
print(L.rate('mumo')) # => 0.7899159663865546
print(L.basis) # => ['momu', 'momo', 'oumo', 'memi', 'mi', 'emi', ...]
The actual learning takes place during the call to L.optimize()
. Sometimes, running this optimization routine more than once gives better results.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
recombinant-1.1.0.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for recombinant-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48f55e3a5a0162b448aa0982edd57f2b77145d08f90b4a39ca1df728dc693d3d |
|
MD5 | 7eca4018d13271d8f6f34e9a6d8c161b |
|
BLAKE2b-256 | ef28551a71e2114ece0c9a6d1fcfa37b9f4bd3cecab17c1c68686e9a71ebe614 |