UNPKG

poplar-annotation

Version:

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

26 lines (25 loc) 765 B
import { Base } from "../Infrastructure/Repository"; export declare namespace LabelCategory { interface JSON { readonly id: number; readonly text: string; readonly color?: string; readonly borderColor?: string; readonly "border-color"?: string; } interface Entity { readonly id: number; readonly text: string; readonly color: string; readonly borderColor: string; } class Repository extends Base.Repository<Entity> { } interface Config { readonly defaultLabelColor: string; } namespace Factory { function create(json: JSON, defaultColor: string): Entity; function createAll(json: Array<JSON>, config: Config): Array<Entity>; } }