圖書格式

Passages and lexicon

Long texts with tap-a-word meanings and sentence audio.

規範正文為英文。

L is a Localized map (base-language text by locale); ? marks an optional field.

A passage is a longer text where every word can be tapped for its meaning and every sentence plays and highlights its audio.

{ "kind": "passage", "id": "story", "title": { "en": "At the café" },
  "paragraphs": [ { "sentences": [
    { "fa": "Hola, ¿qué tal?", "pron": "", "gloss": { "en": "Hi, how are you?" }, "audio": "audio/story-1.mp3",
      "words": [ { "t": "Hola", "s": "hola" }, { "t": "qué", "s": "que-what" }, { "t": "tal", "s": "tal" } ] }
  ] } ] }
  • Each word {t, s?, f?}: t is the word as written, found in the sentence’s fa in order; s is a senseId in lexicon.json; f is a short form note ("past, I"). A number or a word left untagged has no s.
  • A book with any passage needs lexicon.json at the package root:
{ "schema": 1, "entries": [
  { "senseId": "hola", "fa": "hola", "pron": "OH-lah", "gloss": { "en": "hello" }, "type": "interjection", "audio": "audio/w-hola.mp3", "lesson": 1 }
] }

Each entry: senseId (unique), fa, pron, gloss L, type, and optional marked, audio, lesson (the lesson number that teaches it) and extra. Two meanings of one spelling are two senses.