KalanaPerera / react-text-annotate

A React components collection for interactively highlighting parts of text.

Home Page:https://mcamac.github.io/react-text-annotate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-text-annotate

NPM

A React component for interactively highlighting parts of text.

Usage

React 16.8.0 or higher is required as a peer dependency of this package.

npm install --save react-text-annotate

Docs

Examples

A simple controlled annotation.

import {TokenAnnotator, TextAnnotator} from 'react-text-annotate'

<TokenAnnotator
  tokens={['My', 'text', 'needs', 'annotating', 'for', 'NLP', 'training']}
  value={[{start: 5, end: 6, tag: 'TOPIC', color: '#EEE'}]}
/>

About

A React components collection for interactively highlighting parts of text.

https://mcamac.github.io/react-text-annotate

License:MIT License


Languages

Language:TypeScript 92.2%Language:JavaScript 6.7%Language:HTML 1.0%