Docs menu
Reference

Japanese Special Annotation Format

View Markdown

In different Japanese question types, the reference text (refText) supports various annotation formats to meet specific pronunciation requirements, and annotations can also be set through the question type parameter pronunciation.

Supported annotations:

  • Pronunciation: Hiragana or Katakana.
  • Pitch accent: 0, 1, 2, 3, 4, 5, or 6, corresponding to ◎, ①, ②, ③, ④, ⑤, or ⑥.
  • The p tag specifies pronunciation and may be omitted. The optional t tag specifies pitch accent.

1. Single Character Pronunciation Annotation:

When passing parameters, directly use the corresponding annotation format in the refText field of the evaluation text.

Format: a(p:xx, t:y), where a is the character to annotate, xx is its pronunciation in Hiragana or Katakana, and y is its pitch accent.

The following forms are supported:

TagsrefText
Neither p nor t私(わたくし)は日本料理が大好きです。
p only私(p:わたくし)は日本料理が大好きです。
t with implicit p私(わたくし, t:0)は日本料理が大好きです。
Both p and t私(p:わたくし, t:0)は日本料理が大好きです。

Example with both tags:

{
    "mode": "word",
    "refText": "私(p:わたくし, t:0)は日本料理が大好きです。"
}

2. Multiple Character Pronunciation Annotation:

When passing parameters, directly use the corresponding annotation format in the refText field of the evaluation text.

Format: [abc](p:xx, t:y), where the characters in [] are annotated as a single unit, xx is their pronunciation in Hiragana or Katakana, and y is their pitch accent.

The following forms are supported:

TagsrefText
Neither p nor t[明日](あす)の試合は、どんなふうに展開するかお楽しみです。
p only[明日](p:あす)の試合は、どんなふうに展開するかお楽しみです。
t with implicit p[明日](あす, t:0)の試合は、どんなふうに展開するかお楽しみです。
Both p and t[明日](p:あす, t:0)の試合は、どんなふうに展開するかお楽しみです。

Example with both tags:

{
    "mode": "word",
    "refText": "[明日](p:あす, t:0)の試合は、どんなふうに展開するかお楽しみです。"
}

3. Annotation through Question Type Parameters:

When passing parameters, use the corresponding annotation format directly in the pronunciation field of the question type parameters.

Format: Set text and phonemes in each object in the pronunciation array. The phonemes value supports the same four forms as the annotations in refText.

Tagsphonemes
Neither p nor tふう
p onlyp:ふう
t with implicit pふう,t:0
Both p and tp:ふう,t:0

Example:

{
  "mode": "sentence",
  "refText": "明日の試合は、どんな風に展開するかお楽しみです。",
  "pronunciation": [
    {
      "text": "明日",
      "phonemes": "p:あす,t:0"
    },
    {
      "text": "風",
      "phonemes": "p:ふう,t:0"
    }
  ]
}