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.0.0.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for recombinant-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec3d235716260ee4253cb8fda54d6c7d29c3307fdc964441a49a9eb2b77adad2 |
|
MD5 | 960458d805d7ee793409819a5dd76735 |
|
BLAKE2b-256 | 0f312fdc0cea3ace6958122b3e0acd15a8a0cf89f01dc69bf1388e1afe1c4cfa |