API documentation

Public API for MID Orthography model

PolytonicGreek.sortWordsFunction

Alphabetically sort a list of words in Unicode Greek.

sortWords(words, ortho)
source

Alphabetically sort a list of words in Unicode Greek.

sortWords(words, ortho)
source

Phonology and syllabification

Exported:

PolytonicGreek.consonantsFunction

Identify code points representing consonants.

consonants(ortho)
source

Implement consonants function of GreekOrthography interface.

consonants(ortho)
source

Implement GreekOrthography's consonants function for AtticOrthography.

consonants(attic)
source
PolytonicGreek.vowelsFunction

Identify code points representing simple vowels.

vowels(ortho)

This does not include code points representing vowels combined with accents. It does include any code points representing vowels plus breathing or vowels with subscript.

source

Implement vowels function of GreekOrthography interface.

vowels(ortho)
source

Implement GreekOrthography's vowels function for AtticOrthography.

vowels(attic)
source
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
source

Internal:

AtticGreek.longsyllableFunction

True if syll is a long syllable in Attic Greek orthography.

longsyllable(syll, ortho)

Arguments

  • syll is a single syllable
  • ortho an instance of AtticOrthography
source

Accentuation

Exported:

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

Implement GreekOrthography's rmaccents function for LiteraryGreekOrthography.

rmaccents(s, ortho)
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

Counts number of accents in s.

countaccents(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

Accent word according to specified system of accent 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.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

Place specified accent on final syllable of wrd.

accentultima(wrd, accent, ortho)

accent is one of either :ACUTE or :CIRCUMFLEX. The function returns nothing for any other symbol for accent.

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

Place specified accent on penult of wrd.

accentpenult(wrd, accent, ortho)

accent is one of either :ACUTE or :CIRCUMFLEX. The function returns nothing for any other symbol for accent.

source

Internal:

AtticGreek.tokenformFunction

Normalize s to a standard form with no enclitics, and all barytone accent converted to oxytone.

tokenform(s, ortho)
source
AtticGreek.accentsyllableFunction

Add specified accent to a single syllable.

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 symbol for accent.
source