Memoforest Guide
日本語

Annotation JSON format

How to add text annotations to a project in the JSON format.

Annotation JSON Format

How to add text annotations to a project written in the JSON format (TOOL_MANUAL.md). Use it when you want other tools to read and write annotations too.

annotation (text annotation)

  • A note attached to part of the text. It goes in the annotations array of a project
  • If you don't use annotations, you can leave out annotations
  • Like a node, the content of an annotation is an array of sections

annotation fields

  • id: string. Must be unique within the project
  • nodeId: the id of the node the annotation is attached to
  • sectionId: the id of the section the annotation is attached to. If omitted, the section where quote is found is used, but the annotation can't be imported if quote is found in more than one section, so specifying it is recommended
  • quote: the text the annotation is attached to. Write it exactly as it is displayed on screen, without Markdown symbols
  • title: string. The annotation's heading (optional)
  • sections: array of section. The content of the annotation
  • quoteContextBefore, quoteContextAfter: strings (optional). When the same section contains the quote text more than once, use the characters just before and after it to say which one to attach to

Connecting annotations

  • To annotate text inside an annotation, put the parent annotation's id in parentAnnotationId instead of nodeId
  • To place child items under an annotation, put the annotation's id in that node's parentAnnotationId instead of its parentId
  • A section you want the AI to answer becomes a target of "Copy an AI request" when its content is "AI回答待ち" ("pending" or "TBD" also works)

Example with an annotation

{
  "type": "annotator-qa-export",
  "version": 3,
  "projects": [
    {
      "title": "Annotation Sample",
      "nodes": [
        {
          "id": "n-plan",
          "topic": "Trip plan",
          "parentId": null,
          "sections": [
            {
              "id": "n-plan-s1",
              "title": "",
              "content": "On day 1, **leave early in the morning** and arrive by noon."
            }
          ]
        }
      ],
      "annotations": [
        {
          "id": "a-start",
          "nodeId": "n-plan",
          "sectionId": "n-plan-s1",
          "quote": "leave early in the morning",
          "title": "What time should we leave?",
          "sections": [
            {
              "id": "a-start-s1",
              "title": "",
              "content": "AI回答待ち"
            }
          ]
        }
      ]
    }
  ]
}

Write quote as leave early in the morning, as it appears on screen, not as **leave early in the morning**.