0.1.13 • Published 2 months ago

@octra/annotation v0.1.13

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@octra/annotation

This library offers all annotation related classes and functions used by Octra. It uses AnnotJSON file format as base model. Here you can also find all Annotation converters used by Octra.

Installation

ESM, CJS, TS definitions & UMD (optional)

npm install --save @octra/annotation

UMD Bundle (for Vanilla JS)

You have two options to install this package und use it as UMD:

a) Install via NPM and reference local files (no internet connection needed om production).

<script type="application/javascript" src="node_modules/@octra/annotation/index.umd.js"></script>

b) Reference remote file (internet connection needed on production).

<script type="application/javascript" src="https://unpkg.com/@octra/annotation/index.umd.js"></script>

See full example here

Use

Import

ESM, Typescript

Import the classes and functions from @octra/annotation. For example

import { Level } from "@octra/annotation";

const annotation = new OctraAnnotation();
const level = annotation.addLevel(new OctraAnnotation.createSegmentLevel("OCTRA_1"));
annotation.addItemToCurrentLevel(new SampleUnit(123456, 22050), [
  new OLabel(
    "OCTRA_1",
    "hello world"
  )
]);

UMD Bundle

All functions and classes are available via global scope OctraAnnotation. For example:

/*
make sure that you have injected the umd bundle as described before.
 */
const annotation = new OctraAnnotation.OctraAnnotation();
const level = annotation.addLevel(new OctraAnnotation.OctraAnnotation.createSegmentLevel("OCTRA_1"));
annotation.addItemToCurrentLevel(new OctraAnnotation.SampleUnit(123456, 22050), [
  new OctraAnnotation.OLabel(
    "OCTRA_1",
    "hello world"
  )
]);

API

You can find more information about classes and functions of @octra/annotation here.

Changelog

Go to changelog

0.1.13

2 months ago

0.1.11

2 months ago

0.1.12

2 months ago

0.1.10

6 months ago

0.1.9

6 months ago

0.1.8

6 months ago

0.1.7

8 months ago

0.1.6

8 months ago

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.1

8 months ago