A toolkit for phonotactic probability calculation and analysis.
Project description
UCI Phonotactic Calculator
Easily score wordlists with classic and positional-n-gram phonotactic models — right from the command line or a friendly web interface.
✨ What can I do with it?
| Task | One-liner |
|---|---|
| Score a test list with the default model | python -m uci_phonotactic_calculator.main train.csv test.csv out.csv |
| Try the demo data set, using an english training file and english test file | make demo |
| Launch a Django web interface | make django |
| Launch an interactive web UI (Gradio) | make web |
The output is a CSV that adds phonotactic scores next to each word, ready for Excel or Pandas.
🚀 Quick install
# 1. (Optional) create and activate a virtual environment
python -m venv venv
source venv/bin/activate # on Windows: venv\Scripts\activate
# 2. Install the core package
pip install uci-phonotactic-calculator
That’s it! If you need the web UI, just add the extra tag:
pip install "uci-phonotactic-calculator[ui]"
🏃 Your first run
# Train on English, score the sample test set, write results to scores.csv
python -m uci_phonotactic_calculator.main data/english.csv \
data/sample_test_data/english_test_data.csv \
scores.csv
Don’t have your own data yet? Use the built-in demo corpus:
python -m uci_phonotactic_calculator.main --use-demo-data scores.csv
You’ll get a CSV like:
| word | word_len | ngram_bound_conditional | … |
|---|---|---|---|
| CAT | 3 | -3.87 | … |
🖥️ Django interface (optional)
Prefer point-and-click? Fire up the Django web interface:
make django # or: python -m uci_phonotactic_calculator.web.django.webcalc
A browser window opens where you can drop CSVs, tweak a few options, and download scores.
🖥️ Gradio interface (optional)
Prefer point-and-click? Fire up the Gradio UI:
make web # or: python -m uci_phonotactic_calculator.web.web_demo
A browser window opens where you can drop CSVs, tweak a few options, and download scores.
📚 Want to go deeper?
- Run
python -m uci_phonotactic_calculator.main --helpfor all flags. - Developers can install extras with
pip install ".[dev]"and check outCONTRIBUTING.md. - Full docs & citation info: https://phonotactics.socsci.uci.edu/
✏️ Citation
If this tool helps your research, please cite:
Mayer, C., Kondur, A., & Sundara, M. (2022). UCI Phonotactic Calculator (v0.1.0). https://doi.org/10.5281/zenodo.7443706
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uci_phonotactic_calculator-1.0.0.tar.gz.
File metadata
- Download URL: uci_phonotactic_calculator-1.0.0.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbe9b9499e0c892fa0d29355a3a947d6923e3d2ea5fb70f0bb4c48ac5baffaf3
|
|
| MD5 |
5c0ff6ed54ca191aa7daa940f008a7cb
|
|
| BLAKE2b-256 |
77af5e92f9e700f676c0c5254c11e3ae76d1a842001699cf53d8528986cce595
|
File details
Details for the file uci_phonotactic_calculator-1.0.0-py3-none-any.whl.
File metadata
- Download URL: uci_phonotactic_calculator-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e505e228e6232e9b4d3c25ce7c6af9af9b6ccee28a28eb9bab1543af0eacf261
|
|
| MD5 |
4d001a6e88cc4ca201da6c8f6b874ec8
|
|
| BLAKE2b-256 |
e3cb64cadadaef63b6ee83ebdc9cda86138effabf52051c4eec5d602b7a839ed
|