Skip to content

mcamac/react-text-annotate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

41b2f2e · Apr 8, 2020

History

22 Commits
Dec 15, 2019
Apr 8, 2020
Apr 8, 2020
Dec 15, 2019
Dec 15, 2019
Dec 15, 2019
May 17, 2018
Apr 8, 2020
Dec 15, 2019
Apr 8, 2020
Apr 8, 2020
Apr 8, 2020
Apr 8, 2020

Repository files navigation

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'}]}
/>