8.1.12.1.7. cltk.phonology.lat package

Latin phonology

8.1.12.1.7.1. Submodules

8.1.12.1.7.2. cltk.phonology.lat.phonology module

Latin phonology tools

class cltk.phonology.lat.phonology.LatinTranscription[source]

Bases: object

Latin transcriber

transcribe(word)[source]
>>> LatinTranscription().transcribe("meditationes")
'[mɛd̪ɪt̪at̪ɪ̣jɔn̪ɛs]'
Parameters:

word (str) – word to transcribe

Return type:

str

Returns:

transcribed word

class cltk.phonology.lat.phonology.LatinSyllabifier[source]

Bases: object

Latin syllabifier

syllabify(word)[source]
>>> LatinSyllabifier().syllabify("relinquus")
['re', 'lin', 'qu', 'us']
Parameters:

word (str) – word to syllabify

Return type:

List[str]

Returns:

syllabified word

8.1.12.1.7.3. cltk.phonology.lat.syllabifier module

Split Latin words into a list of syllables, based on a set of Latin language syllable specifications and the original work of Father Matthew Spencer in C# and Javascript. Original documentation from Fr. Spencer is preserved where applicable.

cltk.phonology.lat.syllabifier._is_consonant(char)[source]

Checks if char is in the list of vowels in the language

Return type:

bool

cltk.phonology.lat.syllabifier._is_vowel(char)[source]

Checks if char is in the list of vowels in the language

Return type:

bool

cltk.phonology.lat.syllabifier._is_diphthong(char_1, char_2)[source]

Checks if two sequential characters compose a diphthong

Return type:

bool

cltk.phonology.lat.syllabifier._is_mute_consonant_or_f(char)[source]

Checks if char is in the mute_consonants_and_f list

Return type:

bool

cltk.phonology.lat.syllabifier._is_liquid_consonant(char)[source]

Checks if char is in the mute_consonants_and_f list

Return type:

bool

cltk.phonology.lat.syllabifier.syllabify(word)[source]

Splits input Latin word into a list of syllables

>>> syllabify('sidere')
['si', 'de', 're']
Return type:

List[str]

8.1.12.1.7.4. cltk.phonology.lat.transcription module

Convert a word from Latin orthography into its hypothesized pronunciation in the International Phonetic Alphabet (IPA).

https://raw.githubusercontent.com/j-duff/cltk/ipa/ cltk/phonology/lat/transcription.py

class cltk.phonology.lat.transcription.Phone(ipa_ch)[source]

Bases: object

A phonological unit to be manipulated and represented as an IPA string.

class cltk.phonology.lat.transcription.Word(ipa_str, root)[source]

Bases: object

Max. phonological unit, contains phones and triggers alternations.

_refresh()[source]

Assigns left and right contexts for every phone

_j_maker()[source]

Assume word-initial or intervocalic i to be j

_w_maker()[source]

Assume word-initial or intervocalic u to be w

_wj_block()[source]

Addendum to correct possible ‘wj’ sequences

_uj_diph_maker()[source]

Find accidental “ʊɪ” instances and treat as diphthong [uj].

_b_devoice()[source]

Pronounce b as p when followed by s or t.

_final_m_drop()[source]

Final m nasalizes and lengthens nucleus and drops.

_n_place_assimilation()[source]

Pronounce n as ŋ when followed by velar.

_g_n_nasality_assimilation()[source]

Pronounce g as ŋ when followed by n.

_ns_nf_lengthening()[source]

Lengthen vowel before ns or nf.

_l_darken()[source]

Pronounce l as ɫ in coda.

_j_z_doubling()[source]

Double j and z between vowels.

_long_vowel_catcher()[source]

Replace ɪː with iː, ʊː with uː, and ɛː with eː.

_e_i_closer_before_vowel()[source]

e and i become closer (̣) when followed by a vowel.

_intervocalic_j()[source]

epenthesize j between vowels

ALTERNATIONS = [('j_maker', <function Word._j_maker>), ('w_maker', <function Word._w_maker>), ('wj_block', <function Word._wj_block>), ('uj_diph_maker', <function Word._uj_diph_maker>), ('b_devoice', <function Word._b_devoice>), ('final_m_drop', <function Word._final_m_drop>), ('n_place_assimilation', <function Word._n_place_assimilation>), ('g_n_nasality_assimilation', <function Word._g_n_nasality_assimilation>), ('ns_nf_lengthening', <function Word._ns_nf_lengthening>), ('l_darken', <function Word._l_darken>), ('j_z_doubling', <function Word._j_z_doubling>), ('long_vowel_catcher', <function Word._long_vowel_catcher>), ('e_i_closer_before_vowel', <function Word._e_i_closer_before_vowel>), ('intervocalic_j', <function Word._intervocalic_j>)]
_alternate()[source]

After setting left and right contexts for every phone…

syllabify()[source]

Takes Word input and returns a list of syllables as (onset, nucleus, coda) tuples where onset, nucleus, and coda are all lists of Phones. :rtype: List[List[Phone]] :return: list of syllables

_print_ipa(syllabify, accentuate)[source]

Depending on the syllabify and accentuate parameters Prints an appropriately marked up version of the transcription

Parameters:
  • syllabify

  • accentuate

Returns:

class cltk.phonology.lat.transcription.Transcriber(dialect, reconstruction)[source]

Bases: object

Uses a reconstruction to transcribe a orthographic string into IPA.

_parse_diacritics(ch)[source]

EG: input with base a -> a/LENGTH/DIAERESIS/

Parameters:

ch (str) – character

Return type:

str

Returns:

a string with separated and organized diacritics for easier access later.

_prep_text(text)[source]

Performs preparatory tasks grouping and reordering characters in order to make transcription formulaic.

Parameters:

text (str) –

Returns:

transcribe(text, macronize=True, syllabify=True, accentuate=True, with_squared_brackets=True)[source]
>>> allen_transcriber = Transcriber("Classical", "Allen")
>>> example = allen_transcriber.transcribe("Quo usque tandem, O Catilina, " + "abutere nostra patientia?")
>>> example
"['kʷoː 'ʊs.kʷɛ 't̪an̪.d̪ẽː 'oː ka.t̪ɪ.'liː.n̪aː a.buː.'t̪eː.rɛ 'n̪ɔs.t̪raː pa.t̪ɪ̣.'jɛn̪.t̪ɪ̣.ja]"
Parameters:
  • text – text to transcribe

  • macronize – if True, macronize result

  • syllabify – if True, syllabify result

  • accentuate – if True, accentuate result

  • with_squared_brackets – if True, put squared brackets around transcription

Returns:

transcribed text