UNPKG

poplar-annotation

Version:

web-based annotation tool for natural language processing (NLP) needs, inspired by brat rapid annotation tool.

32 lines (31 loc) 1.26 kB
/// <reference types="node" /> import { LabelCategory } from "./LabelCategory"; import { Label } from "./Label"; import { ConnectionCategory } from "./ConnectionCategory"; import { Connection } from "./Connection"; import { EventEmitter } from "events"; export interface Config extends LabelCategory.Config, Label.Config, Connection.Config { readonly contentEditable: boolean; } export interface JSON { readonly content: string; readonly labelCategories: Array<LabelCategory.JSON>; readonly labels: Array<Label.JSON>; readonly connectionCategories: Array<ConnectionCategory.Entity>; readonly connections: Array<Connection.JSON>; } export declare class Store extends EventEmitter { readonly labelCategoryRepo: LabelCategory.Repository; readonly labelRepo: Label.Repository; readonly connectionCategoryRepo: ConnectionCategory.Repository; readonly connectionRepo: Connection.Repository; readonly config: Config; private _content; constructor(config: Config); get content(): string; set json(json: JSON); contentSlice(startIndex: number, endIndex: number): string; private moveLabels; get json(): JSON; spliceContent(start: number, removeLength: number, ...inserts: Array<string>): void; }