API documentation

String composition

PolytonicGreek.strcatFunction

Concatenate s1 and a list of strings slist, taking account of any phonological modifications required by orthography ortho.

strcat(ortho, s1, slist; elision)
source

Concatenate the pair of strings s1 and s2, taking account of any phonological modifications required by orthography ortho.

strcat(ortho, s1, s2)
source

Concatenate s1 and s2 d, taking account of necessary phonological modifications.

strcat(ortho, s1, s2; elision)
source

Phonology

PolytonicGreek.liquidsFunction

Identify code points representing liquid consonants.

liquids(ortho)
source

List code points for liquid consonants in literary Greek.

liquids(ortho)
source
PolytonicGreek.labialsFunction

Identify code points representing labial consonants.

labials(ortho)
source

List code points for labial consonants in literary Greek.

labials(ortho)
source
PolytonicGreek.dentalsFunction

Identify code points representing dental consonants.

dentals(ortho)
source

List code points for dental consonants in literary Greek.

dentals(ortho)
source
PolytonicGreek.palatalsFunction

Identify code points representing palatal consonants.

palatals(ortho)
source

List code points for palatal consonants in literary Greek.

palatals(ortho)
source

Reduplication and augment

PolytonicGreek.augmentFunction

Generic method of function to augment a string.

augment(s, ortho)

Parameters

  • ortho An instance of a GreekOrthography
source

Implementatiοn of GreekOrthography's augment function for literary Greek.

augment(s, ortho)

NB: augment removes all accents from the resulting string.

Parameters

  • ortho An instance of a LiteraryGreekOrthography
  • s An optional string to augment. If is not included, the function returns

a default augment string that can be applied to verb forms starting with a consonant (except note that ρ doubles after augment in standard literary Greek orthography).

source
PolytonicGreek.augment_initialFunction

Generic method of function to identify string for syllabic augment in initial position.

augment_initial(ortho)

Parameters

  • ortho An instance of a GreekOrthography
source

Identify string to use for syllabic augment in word-initial position.

augment_initial(ortho)
source
PolytonicGreek.augment_medialFunction

Generic method of function to identify string for syllabic augment when preceded by a prefix.

augment_medial(ortho)

Parameters

  • ortho An instance of a GreekOrthography
source

Identify string to use for syllabic augment in compound verb.

augment_medial(ortho)
source
PolytonicGreek.reduplicateFunction

Add reduplications to s, taking account of any phonological modifications required by orthography ortho.

reduplicate(s, ortho)
source

Reduplicate s, taking account of any necessary phonological modifications.

reduplicate(s, ortho)
source

Accentuation

PolytonicGreek.rmaccentsFunction

Remove all accent characters from s.

rmaccents(s, ortho)

Parameters

  • s is a Greek string
  • ortho is an implementation of GreekOrthography
source

Default to using literary Greek orthography for rmaccents.

rmaccents(s)
source

Implement GreekOrthography's rmaccents function for LiteraryGreekOrthography.

rmaccents(s, ortho)
source
PolytonicGreek.accentwordFunction

Accent word s.

accentword(s, placement, ortho)

Parameters

  • s is a Greek string
  • placement is :RECESSIVE, or :PENULT
  • ortho is an implementation of GreekOrthography
source

Accent word according to specified system of accent placement.

accentword(wrd, placement)
accentword(wrd, placement, ortho)

Parameters

  • wrd is a string value representing a single lexical token.
  • placement is one of :RECESSIVE for recessive accent

or :PENULT for persistent accent on the penultimate syllable.

Note that it is not possible to accent the ultima correctly without additional morphological information beyond the string value of the token.

source
PolytonicGreek.procliticsFunction

List proclitics in this orthography.

proclitics(ortho)
source

List proclitics in LiteraryGreekOrthography.

proclitics(ortho)

Based on Smyth ¶ 179.

source
PolytonicGreek.encliticsFunction

List enclitics in this orthography.

enclitics(ortho)
source

List enclitics in LiteraryGreekOrthography.

enclitics(ortho)

Based on Smyth ¶ 181.

source
PolytonicGreek.countaccentsFunction

Count accents in s.

countaccents(s, ortho)

Parameters

  • s is a Greek string
  • ortho is an implementation of GreekOrthography
source

Default to using literary Greek orthography for countaccents.

countaccents(s)
source

Counts number of accents in s.

countaccents(s, ortho)
source
PolytonicGreek.accentpenultFunction

Accent penultimate syllable of wrd.

accentpenult(wrd, accent, ortho)

Parameters

  • s is a Greek string
  • accent is :ACUTE, or :CIRCUMFLEX
  • ortho is an implementation of GreekOrthography
source

Place accent on penult.

accentpenult(wrd, accent)
accentpenult(wrd, accent, ortho)
source
PolytonicGreek.accentultimaFunction

Accent final syllable of wrd.

accentultima(wrd, accent, ortho)

Parameters

  • s is a Greek string
  • accent is :ACUTE, or :CIRCUMFLEX
  • ortho is an implementation of GreekOrthography
source

Place accent on ultima.

accentultima(wrd, accent)
accentultima(wrd, accent, ortho)
source

Syllabification

PolytonicGreek.syllabifyFunction

Generic method of GreekOrthography's syllabify function.

syllabify(s, ortho)
source

Allow syllabification defaulting to LiteraryGreekOrthography.

syllabify(s)
source

Split string s into an Array of strings representing syllables.

syllabify(s, ortho)

Example

syllables = PolytonicGreek.syllabify("κελεύει")
join(syllables, "-")
"κε-λευ-ει"
source

Orthographic system

Internals

Syllabification is implemented with a chain of functions applying regular expressions to an input string. These internal functions would not normally be of any use or interest to anyone who simply wants to break a string in polytonic Greek into syllables.

PolytonicGreek.splitmorphemesFunction

Respect explicitly indicated morpheme boundaries.

splitmorphemes(s)

Example

PolytonicGreek.splitmorphemes("εἰσ#ῄα")
"εἰσ ῄα"
source
PolytonicGreek.splitmunuFunction

Mu+nu stay together.

splitmunu(s)

ἀναμιμνησκόμενος breaks as "ἀναμι μνησκομενος"

source
PolytonicGreek.splitdiphthongvowelFunction
splitdiphthongvowel(s)

Split between a diphthong and following vowel.

Example

PolytonicGreek.splitdiphthongvowel("κελεύει")
"κελευ ει"
source

Internals

Internals

PolytonicGreek.allaccentsFunction

List all code points including an accent.

allaccents()

Default to using LiteraryGreekOrthography.

source

List all code points including an accent in LiteraryGreekOrthography.

allaccents(ortho)
source
PolytonicGreek.accentstripdictFunction

Dictionary mapping Unicode codepoints with accents to codepoint with accent stripped.

accentstripdict()

Default to using LiteraryGreekOrthography.

source

Dictionary mapping Unicode codepoints with accents to codepoint with accent stripped for LiteraryGreekOrthography.

accentstripdict(ortho)

We can't just use Unicode.normalize with stripmark flag because that strips breathings, iota subscripts, and diaereses as well.

source
PolytonicGreek.flipdictFunction

Dictionary of barytone to oxytone conversions.

flipdict()

Default to using LiteraryGreekOrthography.

source

Dictionary of barytone to oxytone conversions for LiteraryGreekOrthography.

flipdict(ortho)
source
PolytonicGreek.acutedictFunction

Dictionary of acutes.

acutedict()

Default to using LiteraryGreekOrthography.

source

Dictionary of acutes for LiteraryGreekOrthography.

acutedict(ortho)
source
PolytonicGreek.circumflexdictFunction

Dictionary of circumflexes.

circumflexdict()

Default to using LiteraryGreekOrthography.

source

Dictionary of circumflexes for LiteraryGreekOrthography.

circumflexdict(ortho)
source
PolytonicGreek.addacuteFunction

Add an acute accent to a single vowel or diphthong.

addacute(vowel)
addacute(vowel, ortho)

Examples

julia> PolytonicGreek.addacute("ᾀ")
"ᾄ"
julia> PolytonicGreek.addacute("τα")
┌ Warning: addacute: can't add acute accent to vowel τα
source
PolytonicGreek.addcircumflexFunction

Add a circumflex accent to a single vowel or diphthong

addcircumflex(vowel)
addcircumflex(vowel, ortho)

Examples

julia> PolytonicGreek.addcircumflex("ᾀ")
"ᾆ"
julia> PolytonicGreek.addcircumflex("τα")
┌ Warning: addcircumflex: can't add circumflex accent to vowel τα
source
PolytonicGreek.accentsyllableFunction

Add specified accent to a single syllable.

accentsyllable(syll, accent)
accentsyllable(syll, accent, ortho)

Parameters

syll is a string value for a single syllable. accent is either :ACUTE or :CIRCUMFLEX. The function returns nothing for any other symble for accent.

Examples

julia> PolytonicGreek.accentsyllable("των", :CIRCUMFLEX)
"τῶν"
julia> PolytonicGreek.accentsyllable("τα", :ACUTE)
"τά"
julia> PolytonicGreek.accentsyllable("ᾀ", :ACUTE)
"ᾄ"
source
PolytonicGreek.longsyllableFunction

True if syll is metrically long by nature.

longsyllable(syll, ortho)

Arguments

  • syll is text for a single syllable
  • ortho is a GreekOrthography

Examples

julia> PolytonicGreek.longsyllable("τει")
true
julia> PolytonicGreek.longsyllable("τε")
false
source
PolytonicGreek.shortsyllableFunction

True if syll is not long by nature.

shortsyllable(syll, ortho)

Examples

julia> PolytonicGreek.shortsyllable("ε")
true
julia> PolytonicGreek.shortsyllable("ει")
false
source
PolytonicGreek.includesdiphthongFunction

True if s contains a diphthong.

includesdiphthong(s)

Examples

julia> PolytonicGreek.includesdiphthong("εὐθύς")
true
julia> PolytonicGreek.includesdiphthong("ᾔα")
false
source