<sentence-editor> component documentation

Component for editing Sentence objects.

Manages interlinearization of a transcription by providing a dynamically-updated list of <word-editor>s for glossing tokens.

Tokenization can be customized by referencing a Language.

Usage

Basic usage

    <sentence-editor>
    </sentence-editor>
  

Editing a literary sentence

Scenario: working through a “literary” text with many external resources available — e.g., this Pali sentence (similar for, say, Ancient Greek, Latin, Tamil, Tibetan, Coptic…):

    <sentence-editor>
    </sentence-editor>
  

Working in a Pali study group

Working through a Pali text is mostly a matter of:

  1. Identifying the morphological forms of words
  2. Classifying them by grammatical category
  3. Trying to build up a translation from those analyzed words

We use a Google Doc (it allows collaboration). The actual workflow goes:

  1. Paste in the sentence from a text.
  2. Copy and paste the whole sentence again (painful)
  3. Tokenize the copy onto its own line (painful)
  4. Start glossing each word (irritating switching )
  5. Put together a translation for the whole sentence

What could help?

  1. paste the sentence
  2. tokenize
  3. renderWords()
  4. onsubmit

Editing an existing sentence

    <sentence-editor 
      transcription="mi casa su casa"
      translation="My home is your home.">
    </sentence-editor>
  

Example

Javascript

Properties

get data()

Returns the component’s sentence data as an object.

set data(sentence)

Set the sentence’s data.

Attributes

Events