Skip to main content

Rule-based grapheme-to-phoneme converter for Barranquenho

Project description

g2p_barranquenho - Barranquenho Phonemizer

This repository provides a grapheme-to-phoneme (G2P) converter for the Barranquenho language: hand it written Barranquenho, get back IPA.

Barranquenho is an Ibero-Romance variety spoken in the municipality of Barrancos, Portugal, sharing many features with the neighbouring Extremaduran and Andalusian varieties of Spanish — coda-/s/ aspiration, betacism (v[b]), the alveolar trill, and southern vowel reduction.

Architecture

The phonology lives in the shared orthography2ipa language spec ext-PT-x-barrancos. That spec — its grapheme table, allophone rules, stress model and cross-word sandhi — is the single source of truth for how Barranquenho is realised. This package is a thin wrapper around orthography2ipa.G2P driven by that spec:

  • transcribe(text) phonemises a whole utterance, so the spec's cross-word sandhi applies (coda-/s/ aspiration and deletion, article and conjunction destressing, vowel elision at word boundaries).
  • phonemize(word) phonemises one word and returns its phones as a list.
  • The package owns only caller-side text handling (case/Unicode normalisation) and this stable surface. The linguistic rules belong to the spec, so improving a rule is an upstream edit that every consumer shares.

Lexical stress is marked with ˈ before the stressed syllable. Nasal vowels carry the combining tilde U+0303 (ɐ̃), and a coda m/n is absorbed into the preceding nasal vowel rather than surfacing as its own segment.

🚀 Usage

phonemize takes one word and returns a list of IPA phones; join the list for a compact string:

from g2p_barranquenho import phonemize

phonemize("boca")      # ['ˈb', 'ɔ', 'k', 'ɐ']
phonemize("manhán")    # ['m', 'ɐ', 'ˈɲ', 'ɐ̃']
phonemize("ambu")      # ['ˈɐ̃', 'b', 'u']

"".join(phonemize("cahtelu"))   # 'kɐˈhtɛlu'

transcribe takes a whole utterance and applies cross-word sandhi:

from g2p_barranquenho import transcribe

transcribe("O tempu não ehtá nada bom agora.")
# 'o ˈtẽpu ˈnɐ̃w̃ eˈhta ˈnadɐ ˈbõ ɐˈɡɔɾɐ'

transcribe("Comprámos pão e vinho na feira de Barrancos.")
# 'kõˈpɾamu ˈpɐ̃w̃ i ˈbiɲu nɐ ˈfejɾɐ dɨ bɐˈrɐ̃ku'

The BarranquenhoG2PPlugin class in g2p_barranquenho.plugin exposes the same engine behind the string-returning transcribe / transcribe_word methods other components in the toolchain expect.

Documentation

Sources

The ext-PT-x-barrancos spec derives from the coordinated normative suite produced under the Programa de Preservação e Valorização da Língua e Cultura Barranquenhas, plus the phonetic descriptions of Navas Sánchez-Élez:

  • Convenção Ortográfica do Barranquenho (June 2025). Câmara Municipal de Barrancos / II Congresso Barranquenho working group.
  • Gramática Básica de Barranquenho (July 2025). Maria Filomena Gonçalves, María Victoria Navas, Victor M. Diogo Correia. Universidade de Évora, 1ª edição. ISBN 978-972-778-464-6.
  • Dicionário de Barranquenho (2025). Maria Filomena Gonçalves, María Victoria Navas, Vera Ferreira. Universidade de Évora, 1ª edição. ISBN 978-972-778-460-8.
  • Navas Sánchez-Élez, M. V. (2011). El barranqueño: un modelo de lenguas en contacto. Madrid: Editorial Complutense.

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

g2p_barranquenho-0.1.2a4.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

g2p_barranquenho-0.1.2a4-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file g2p_barranquenho-0.1.2a4.tar.gz.

File metadata

  • Download URL: g2p_barranquenho-0.1.2a4.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for g2p_barranquenho-0.1.2a4.tar.gz
Algorithm Hash digest
SHA256 ce2330ade59b2dcf379407227b18be817c1d2c63b27f34911cd58c6ae45054e4
MD5 8a99e77019ff241989c15838c67c187a
BLAKE2b-256 ca977ce4a938b7eed6ebf82cab87a4dbf88755c4cddc24eb936d8f3f85cdae04

See more details on using hashes here.

File details

Details for the file g2p_barranquenho-0.1.2a4-py3-none-any.whl.

File metadata

File hashes

Hashes for g2p_barranquenho-0.1.2a4-py3-none-any.whl
Algorithm Hash digest
SHA256 36974bdf05088ae49595781419a94471c8085b88dc2dadb990aaac39e83d67f6
MD5 1731c9ca8c4f2371807d0ddfc8aeb971
BLAKE2b-256 638efb9cfb181ce116e04de3d0ee40335ca22ef7950eb7f25266747c34b566aa

See more details on using hashes here.

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