Skip to main content

lingcore

Abstract linguistic structures for Python.

lingcore provides notation-agnostic building blocks for working with linguistic data: values, features, feature systems, segments, segment inventories, and feature matrices. It has no hardcoded knowledge of IPA, X-SAMPA, or any particular linguistic framework. Consumers bring their own notation and their own feature tables; lingcore provides the structure.

Why

Most phonological or phonetic tooling in Python is either tightly bound to a specific notation (IPA, X-SAMPA) or a specific feature framework (PanPhon, Hayes, PHOIBLE), or it reimplements the same three or four data classes in every project. lingcore factors out the structure so that notation-specific packages can be built on top of a shared, stable foundation.

If you are building a package for IPA, a package for sign-language phonology, or a package for a constructed language you invented last weekend, lingcore gives you the containers without imposing assumptions.

Install

pip install lingcore

Optional extras:

  • lingcore[pandas] — for FeatureMatrix.to_dataframe().
  • lingcore[dev] — for running the test suite.

Quick example

from lingcore import (
    Feature, FeatureSystem, Segment, SegmentInventory, Value,
    feature_matrix,
)

# Define a feature system.
system = FeatureSystem(
    name="toy",
    version="0.1.0",
    features=(Feature("voice"), Feature("nasal")),
)

# Define an inventory that uses it.
inv = SegmentInventory(
    id="toy",
    types=("consonant",),
    classifiers={"consonant": ("manner", "place")},
)

# Add segments.
inv.add(Segment(
    symbol="p",
    type="consonant",
    classification={"manner": Value("stop"), "place": Value("bilabial")},
    values={"voice": Value("-"), "nasal": Value("-")},
))
inv.add(Segment(
    symbol="m",
    type="consonant",
    classification={"manner": Value("nasal"), "place": Value("bilabial")},
    values={"voice": Value("+"), "nasal": Value("+")},
))

# Materialize a feature matrix.
m = feature_matrix(inv, system)
print(m.distinguishing_features(0, 1))
# ['voice', 'nasal']

What lingcore is not

  • Not a tokenizer. It does not know how to split an IPA string into phones. That is the job of a notation-specific package built on top.
  • Not a feature table. It does not ship PanPhon or Hayes features. Consumers provide feature tables; lingcore only provides the containers.
  • Not an I/O library. It does not read or write YAML, JSON, or CSV. Serialization is a consumer concern.
  • Not a full linguistic framework. It has no notion of phonemes, allophony, phonotaxis, syllables, or prosody beyond what is expressed as features. Those are future work, potentially in a sibling package.

Status

Alpha. The API is small and, we hope, stable, but it may change before 1.0. See docs/summary.md for a detailed implementation status.

Documentation

License

GPL-3.0-or-later. See LICENSE.

Metadata

Release files for lingcore 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lingcore 0.1.0
File Size Uploaded
lingcore-0.1.0.tar.gz 40.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lingcore 0.1.0
File Interpreter ABI Platform
lingcore-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 69.2 kB

Release files / lingcore-0.1.0.tar.gz

Download URL lingcore-0.1.0.tar.gz
Size 40.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f742a292fc94eb5b0223152f706cf7978f2a1c7657d5acf72ad6728fa1c2ab26
BLAKE2b-256 checksum
How to use checksums
406f263780ec9856365ff48333a7298f932a779ecad8ebafda84f1cdb2744256
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / lingcore-0.1.0-py3-none-any.whl

Download URL lingcore-0.1.0-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9dae54315751bbfe0b4e26be5fc7c6c1a56a34ea3861369fe889d268c34b283
BLAKE2b-256 checksum
How to use checksums
7e3499a25ea14b03b0ef3644818112bade2d4ff6dbf755280360ba79ffa0ff90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page