0.1.3 • Published 5 years ago
vue-sequence-labeling-box v0.1.3
vue-sequence-labeling-box
A component for sequence labeling developed via Vue2
Concept
// initial annotations:
[
  {
    word: "James",
    label: "name",
  },
];
// latest annotations:
[
  {
    word: "James",
    label: "name",
  },
  {
    word: "basketball",
    label: "sports",
  },
  {
    word: "🏀 ",
    label: "emoji",
  },
];Installation
npm install --save vue-sequence-labeling-boxDemo
ES6 Modules
import sequenceLabelingBox from "vue-sequence-labeling-box";<sequence-labeling-box v-model="annotations" :text="text" />Props API
| Props | Description | Type | Must Required | Default | 
|---|---|---|---|---|
| v-model | { "word": "James", "label": "name" },{ "word": "basketball", "label": "sports" },... | annotation[] | yes | [] | 
| text | text | String | yes | |
| color | theme color | String | no | '#577eba' | 
| maxHeight | max height of sequence labeling box | String or null | no | null | 
# install dependencies
npm install
# compiles and hot-reloads for development
npm run serve
# compiles and minifies for production
npm run build