Skip to main content

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


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)

Uploaded Source

Built Distribution

recombinant-1.1.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page