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
Metadata
Release files for uci-phonotactic-calculator 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| uci_phonotactic_calculator-1.0.1.tar.gz | 3.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uci_phonotactic_calculator-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 MB
Release files / uci_phonotactic_calculator-1.0.1.tar.gz
| Download URL | uci_phonotactic_calculator-1.0.1.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c13c6cfa09ca8f2fea97a948533036357cce459a2f392726d088e0dbd9e7c544
|
|
BLAKE2b-256 checksum How to use checksums |
43d48194f9b4520e4dd2027f9366db093bab0c4526d4791437acda6722bea375
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / uci_phonotactic_calculator-1.0.1-py3-none-any.whl
| Download URL | uci_phonotactic_calculator-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c66c7cd38cc28c62faf79c3c68be4950cdfe67064a1cde581748efbcc64f413
|
|
BLAKE2b-256 checksum How to use checksums |
e086b41aa61756d40dab17edcdb0e136b4185b5008fb07e3a8a2fdc64702636f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|