Skip to main content

FurlanG2P: a scalable, library-first G2P and text normalization toolkit (skeleton).

Project description

FurlanG2P

Tools and library code for converting Friulian (Furlan) text to phonemes. The project ships a small gold lexicon and a rule-based engine that together provide an experimental ipa command-line tool. Other pieces of the pipeline – text normalisation, tokenisation, full G2P and phonology – are present as skeletons and currently raise NotImplementedError.

Quick local run (how to launch the CLI and test phrases)

  1. Create and activate a virtual environment:

    • macOS / Linux:
      python -m venv .venv
      source .venv/bin/activate
      
    • Windows (PowerShell):
      python -m venv .venv
      .\.venv\Scripts\Activate.ps1
      
    • Windows (cmd.exe):
      python -m venv .venv
      .\.venv\Scripts\activate
      
  2. Install the package in editable mode so the furlang2p console script becomes available:

    pip install -e .
    
  3. Run the CLI and test short phrases (examples):

    • Basic phonemize using the seed lexicon with rule fallback:

      furlang2p ipa "ìsule glace"
      # Example output:
      # -> ˈizule ˈglatʃe
      
    • Wrap each token in slashes:

      furlang2p ipa --with-slashes "glaç"
      # -> /ˈglatʃ/
      
    • Force rule-based conversion (skip lexicon lookup):

      furlang2p ipa --rules-only "glaç"
      # -> glatʃ
      
    • Use underscores as pause markers and change token separator:

      furlang2p ipa --sep '|' _ "ìsule" __
      # -> _|ˈizule|__
      

    Notes:

    • Quotes around the phrase are recommended to preserve spacing and punctuation.
    • The CLI is experimental; some commands (normalize, g2p, phonemize-csv) are stubs that raise NotImplementedError.

Installation

From PyPI

pip install furlang2p

From source

  1. Create and activate a virtual environment (see Quick local run above).

  2. Install the project in editable mode:

    pip install -e .
    
  3. (Optional) Add development tools for linting, typing and tests:

    pip install -e .[dev]
    

Usage

The package exposes a furlang2p CLI. At present only the experimental ipa subcommand does real work; the normalize, g2p and phonemize-csv commands are stubs that abort with NotImplementedError.

Run furlang2p --help or furlang2p ipa --help for full details about options.

Development

Run the following checks before committing code:

isort .
black .
ruff check .
mypy src
pytest -q

VS Code integration

A .vscode/tasks.json file provides shortcuts for common actions:

  • Install dependenciespip install -e .[dev]
  • Format – run isort and black
  • Lint – run ruff
  • Type check – run mypy on src
  • Test – execute pytest -q

From VS Code press Ctrl+Shift+B or run Tasks: Run Task from the Command Palette and choose the desired action.

References

This project draws on published descriptions of Friulian orthography and phonology as well as lemma-level IPA transcriptions. A curated bibliography with live and archived links is maintained in docs/references.md.

Contributing

Pull requests that flesh out the skeleton or expand test coverage are welcome. Please open an issue to discuss major changes.

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

furlang2p-0.0.3.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

furlang2p-0.0.3-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file furlang2p-0.0.3.tar.gz.

File metadata

  • Download URL: furlang2p-0.0.3.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for furlang2p-0.0.3.tar.gz
Algorithm Hash digest
SHA256 980bd80ac04883f95ece708942003cf654ff9515adcf67b14a119ce31230cac4
MD5 ddb9ea22fcfa84727ee3e97d1b9350b2
BLAKE2b-256 12f1a655a91a5c426f260587af38add459f2e7f1d82f4767215da40161bb09a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for furlang2p-0.0.3.tar.gz:

Publisher: release.yml on daurmax/FurlanG2P

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file furlang2p-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: furlang2p-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for furlang2p-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e27fe4091032aa5bfe9bdfea692e752f4d37ab7bc9f373c8813fb26fa0d35b3e
MD5 816698938de4daca008203c8c2a437c2
BLAKE2b-256 a9e887d31719d2fbbe92eb52c15feff81ca7e14f7ec638fe44d0911029c2250c

See more details on using hashes here.

Provenance

The following attestation bundles were made for furlang2p-0.0.3-py3-none-any.whl:

Publisher: release.yml on daurmax/FurlanG2P

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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