diff --git a/website/docs/api/data-formats.md b/website/docs/api/data-formats.md index 6f166f4b9..210e5d47d 100644 --- a/website/docs/api/data-formats.md +++ b/website/docs/api/data-formats.md @@ -95,6 +95,7 @@ annotations. You need to only specify those keys corresponding to the task you want to train. ```python +### Flat dictionary { "text": string, # Raw text. "words": List[string], # List of gold tokens. @@ -161,6 +162,7 @@ the previous section, but there are two main sections `token_annotation` and [`Token` attributes](/api/token#attributes) such as "ORTH" and "TAG". ```python +### Hierarchical dictionary { "text": string, # Raw text. "token_annotation": { diff --git a/website/docs/api/example.md b/website/docs/api/example.md index ec4399a8b..e75c84522 100644 --- a/website/docs/api/example.md +++ b/website/docs/api/example.md @@ -41,7 +41,7 @@ both documents. ## Example.from_dict {#from_dict tag="classmethod"} Construct an `Example` object from the `predicted` document and the reference -annotations provided as a dictionary. For more details on the required format, +annotations provided as a dictionary. For more details on the required format, see the [training format documentation](/api/data-formats#dict-input). > #### Example @@ -244,8 +244,9 @@ accuracy of predicted entities against the original gold-standard annotation. ## Example.to_dict {#to_dict tag="method"} -Return a dictionary representation of the reference annotation contained in this -`Example`. +Return a +[hierarchical dictionary representation](/api/data-formats#dict-hierarch) of the +reference annotation contained in this `Example`. > #### Example >