Coder Social home page Coder Social logo

kdelwat / onset Goto Github PK

View Code? Open in Web Editor NEW
35.0 5.0 7.0 885 KB

A language evolution simulator, using realistic phonetic changes.

Home Page: https://onset.cadel.me

License: MIT License

Python 65.57% HTML 0.50% JavaScript 15.93% Vue 17.35% Dockerfile 0.66%
phonetics linguistics vue flask python phonology

onset's Introduction

Onset

Onset is a language evolution simulator, which evolves a list of words in IPA form according to realistic phonological rules.

The frontend is built with Vue and the CSS framework Bulma. It communicates with the backend using simple REST endpoints.

The backend is built with Python and Flask.

Directory Structure

  • src is the source code for the Vue frontend
  • app is the source code for the Python API, written in Flask.
  • engine is the source code for the evolution engine which is called by Flask.
  • app/templates/ contains the Webpack-generated index file, served with Flask.
  • app/static/ contains static assets generated by Webpack.
  • config contains Webpack configuration files, generated using vue-cli

Build Setup

# install Python dependencies
pip install -r requirements.txt

# install Javascript dependencies
npm install

# build frontend
npm run build

# run using Flask's development server
python run.py

# or use PyPy for a speed boost
pypy3 run.py

To install development requirements, which will allow testing, validation, and script usage:

pip install -r requirements-dev.txt

To validate the YAML data:

pykwalify -d engine/data/rules.yaml -s engine/data/rules.schema.yaml
pykwalify -d engine/data/diacritics.yaml -s engine/data/diacritics.schema.yaml

To run the tests:

py.test

Sources

A variety of sources were used for the information needed to build this app. Please see the LICENCE.md file in the engine/data directory for specific data sources.

The following papers were used when implementing the algorithms:

  • Harold R. Bauer (1988) The ethologic model of phonetic development: I. Phonetic contrast estimators, Clinical Linguistics & Phonetics, 2:4, 347-380, DOI: 10.3109/02699208808985265
  • Carol Stoel-Gammon (2010) The Word Complexity Measure: Description and application to developmental phonology and disorders, Clinical Linguistics & Phonetics, 24:4-5, 271-282, DOI: 10.3109/02699200903581059
  • Carterette, E. and Jones, M. (1974) Informal Speech: Alphabetic and Phonetic Texts with Statistical Analyses and Tables (Berkeley: University of California Press).

General information on the linguistics underpinning the app is from:

A lot of technical inspiration was taken from the source code of panphon. In particular, the deparsing algorithm and YAML data files were inspired by panphon's approach. Please check it out!

onset's People

Contributors

kdelwat avatar rhotacizer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

onset's Issues

IPA input?

Hi there—obviously this is 4 years old but it could be exactly what I'm looking for to experiment with what english would sound like in a far-future setting.

However, the IPA input doesn't seem to be working. When I input ˈdʒʌŋɡəl, it gives me unknown character. I looked through the YAML but it seems like there are only certain unicode characters allowed? Is this expecting some specific form of IPA that I'm not familiar with?

Thanks :)

Potential bug with 'Vowel Nasalization' rule application

I'm not sure if this is intended behavior or not, but I noticed that when the rule, "Vowels become nasalized after nasal consonants," the rule did not apply to long vowels after nasal consonants. I recognize that this may be intended behavior but I thought I'd bring it to your attention anyway.

Sound changes to rewrite

The following sound changes must be added to the rules.yaml file before releasing the new version.

  • Palatalization
  • Consonant Apheresis
  • Velarization
  • Labialization
  • Dentalization
  • Rhotacism
  • Lambdacism
  • T-Glottalization
  • Flapping
  • Consonant Nasalization
  • Voicing
  • Lateral Vocalization
  • Palatal Vocalization
  • Approximation
  • Degemination
  • Spirantization
  • Debuccalization
  • Affrication
  • Deaffrication
  • Approximant Elision
  • Gemination
  • Despirantization
  • Consonant Denasalization
  • Devoicing
  • Vowel Nasalization
  • Raising
  • Lowering
  • Fronting
  • Backing
  • Rounding
  • Unrounding
  • Lengthening
  • Shortening
  • Glide Formation
  • Glide Insertion
  • Coalescence
  • Vowel Apheresis
  • Apocope
  • Syncope
  • Prothesis
  • Diphthongization
  • Smoothing

Restructure application

Currently the front-end and back-end are completely separate and must be run independently. They should be combined, using Flask to host the front-end.

Create README

There is currently no real README for the application. This should be written before release, including install instructions and information sources.

Missing build/build.js

When trying to run npm run build, npm throws an error because it can't find build/build.js:

> [email protected] build .../Onset
> node build/build.js

module.js:471
    throw err;
    ^

Error: Cannot find module '.../Onset/build/build.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

npm ERR! Linux 4.4.0-53-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `node build/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script 'node build/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the onset package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs onset
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls onset
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     .../Onset/npm-debug.log

Debug log:
npm-debug.log.txt

Necessary sound changes

Consonants

  • palatalization
  • velarization
  • fusion
  • segmentalization
  • labialization
  • retroflexion
  • dentalization
  • rhotacism
  • lambdacism

Lenition

  • flapping
  • t_glottalization
  • nasalization

Sonorization

  • voicing
  • lateral_vocalization
  • palatal_vocalization
  • approximation

Opening

  • degemination
  • affrication
  • deaffrication
  • spirantization
  • debuccalization
  • approximant_elision

Fortition

  • gemination
  • despirantization (?)
  • denasalization
  • devoicing

Vowels

  • nasalization
  • raising
  • lowering
  • fronting
  • backing
  • rounding
  • unrounding
  • centralization
  • lengthening
  • shortening
  • diphthongization
  • monophthongization
  • glide_formation
  • glide_insertion
  • glide_strengthening
  • coalescence

Whole-Segment

  • aphaeresis
  • apocope
  • syncope
  • prothesis
  • excrescence
  • epenthesis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.