文章のアノテーション

POST/v1/annotate

A row for each word of a passage: where it is, its language, its base form, the reading chosen with the other readings the written form has, the inflected form it is written in, the headword's pitch accent, how common the word is, its word class and the entry's first gloss. A word is the longest run the dictionary holds as one written form. Every character of the passage draws from the balance, and the passage is not stored.

パラメータ

passagestring必須body
The text to annotate, in Japanese, English or both. The script of each word decides its language. At most 5000 characters, counted as Unicode code points

レスポンス200PassageAnnotation

charactersinteger必須
The characters the passage has, each drawn from the balance
rowsPassageRow[]必須
A row for each word, in the order the passage writes them. Punctuation and symbols have no row
PassageRow
surfacestring必須
The word as the passage writes it: the longest run the dictionary holds as one written form, so 見に行きました is one row
startinteger必須
Where the surface starts in the passage, in Unicode code points from 0
endinteger必須
Where the surface ends, exclusive
lang"eng" | "jpn"必須
headwordstring必須null 可
The base form: the headword of the word's entry, which the entry route answers in full. Null for a word with no entry, a name for example, which has a reading and nothing else below
readingstring必須null 可
jpn only. The reading chosen for the surface, in kana. A written form can have several readings, and `other_readings` lists the rest
other_readingsstring[]必須
jpn only. Every other reading the written form has
formPassageForm必須null 可
The inflected form the word is written in; null for a word in its base form
PassageForm
namestring必須
The form's name in the word's language: 過去形, past tense
translationsobject必須
The form's name by language: {"eng": "past"}
translations.{key}string
polarity"positive" | "negative"必須null 可
jpn only
tone"plain" | "polite"必須null 可
jpn only
accentinteger必須null 可
jpn only. The headword's pitch accent, the mora after which the pitch falls and 0 for none; an inflected form carries its headword's. Null where the entry has none
frequency_band"very_common" | "common" | "uncommon" | "rare" | "very_rare"必須null 可
How common the entry is in its language, in five bands. Null for a word with no entry and for an entry the dictionary has not ranked
posstring必須null 可
The word class, named in the word's language
glossstring必須null 可
The entry's first gloss under the reading chosen, in the other language: not the sense the passage uses

エラー

ステータスコード条件
401
unauthorizedapi_key_invalidapi_key_revokedapi_key_suspended
キーがない、または無効、取り消し済み、停止中のキーです。
402
balance_empty
アカウントの残高がなくなりました。チャージするか、無料枠が戻るのを待ってください。
403
entry_limit_reached
応答がアカウントの異なるエントリーの上限を超えます。取得済みのエントリーは引き続き応答します。
429
rate_limited
バーストを使い切りました。retry-after を読んでください。
422
requiredtoo_long
文章がない、空、または 1 回に送れる長さを超えています。