Skip to content

AntonVdovenkoASUS/citation-annotation

Repository files navigation

Citation Annotation Tool

A web application for annotating citation relationships in conversational data. This tool allows users to upload JSONL files containing conversation data and manually annotate citations between source text and generated responses.

Features

  • File Upload: Support for JSONL format files with conversation data
  • Dual-Panel Display: Side-by-side view of source text and generated text
  • Citation Management: Add, edit, and delete citation relationships
  • Interactive Text Selection: Click and drag to select text spans for citations
  • Navigation Controls: Browse through multiple data entries
  • Export Functionality: Export annotated data back to JSONL format
  • Statistics Display: Track progress with current row and citation counts

Installation

  1. Clone the repository or download the source code
  2. Navigate to the project directory
  3. Install dependencies:
npm install

Usage

Starting the Application

Run the development server:

npm start

Open http://localhost:3000 to view the application in your browser.

Using the Tool

  1. Upload Data: Click "Choose File" to upload a JSONL file containing your conversation data
  2. Navigate: Use Previous/Next buttons to browse through data entries
  3. Annotate Citations:
    • Click "Add Citation" to create a new citation relationship
    • Select text spans in either the source or generated text panels
    • Edit citation details including start/end indices and explanations
    • Save or delete citations as needed
  4. Export Results: Click "Export JSONL" to download your annotated data

Data Format

The application expects JSONL files where each line contains a JSON object with a msgs array containing:

  • Index 1: Source/input text message
  • Index 2: Generated/output text message
  • Index 3: Citations data (will be created/updated by the tool)

Building for Production

To create a production build:

npm run build

The build folder will contain the optimized production files ready for deployment.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •