Overview

YARN editor is a web app for annotating using the YARN semantic representation formalism. It runs entirely in your browser, and your data is stored locally on this device (via localStorage).

Hint: Ready to begin? Start with Getting Started →

Warning

Because data is saved in your browser’s localStorage, it’s tied to the current device and browser. Clearing site data or switching browsers can remove local content — to back up or move your work, use Export.

Key Concepts

  • Sample — a collection of YARN documents.
  • YARN document — a single annotated instance (typically one sentence).
  • Graph Editor — interactive view that allows adding edges and editing elements.

1. Getting Started

To work with the app and to be able to save changes, you need to have an active sample.

1.1 Create Your First Sample

  1. In the Sidebar, click Create Sample.
  2. In the dialog, enter a name for the sample (e.g., sample_1).
  3. Click Add.

The new sample appears in the Sidebar list.

1.2 Add Documents to a Sample

To work with YARN documents, first add them to the selected Sample. You can either create a new document from or upload existing files in YARN JSON (yarn.json) or GREW (grew.json) format.

Option A — Create a YARN document

  1. Select your Sample in the Sidebar.
  2. Click on options dropdown and select Create new YARN.
  3. Provide sent_id (e.g., sent_001) and the sentence text.
  4. Click Add.
Create new YARN document dialog
Screenshot: Creating a new YARN document.

Option B — Upload existing documents

  1. Select your Sample.
  2. Click on options dropdown and select Upload existing YARN.
  3. Choose one or more .json document in base YARN or GREW format.
  4. Confirm Upload.

2. Graph Editor

The Graph Editor is the central workspace where you see the visual representation of a YARN document. You can reposition elements and apply edits that are reflected in the document.

Graph Editor workspace
Screenshot: Visual editing area showing nodes and edges. Use Edge Link Mode to connect nodes; right-click elements for more actions.

2.2 Context Menu (Right-Click)

Right-clicking on a node or edge opens a context menu with actions:

  • Rename — change the element label.
  • Delete — remove the element.
Right-click context menu on node/edge
Screenshot: Renaming and deleting elements via context menu.

3. YARN JSON Editor

The YARN JSON editor shows a live view of the currently edited document. It has a toolbar with multiple options.

Toolbar

Apply changes

JSON document can be edited directly in the editor, then click Apply changes to apply those edits to the graph. If the content is invalid, an error is shown and nothing is applied.

Undo / Redo

Step backward or forward through recent actions.

Save

Saves the current document to browser storage.

Warning: Changes are not saved to browser storage until you click Save.
JSON editor with toolbar: Apply changes, Undo/Redo, Save, and more menu
Screenshot: JSON editor toolbar and the document view.

Access the menu via the button next to Save.

More options (⋯)

Save As…

Saves the document with a new name inside the same Sample (creates a copy).

Download as YARN / Download as GREW

Exports the current document you see in the editor (not the last saved version) in the selected format.

Show changes…

Opens a diff between the last saved version and the current document:

  • JSON diff — textual differences in JSON.
  • SVG diff — visual differences in the rendered graph.
JSON text diff dialog comparing saved version to current unsaved version
Changes — Text Diff: Saved version vs. Current (unsaved).
Graph view diff showing SVG comparison of saved and current documents
Changes — Graph View (SVG diff): visual comparison of saved vs. current.