Socket
Socket
Sign inDemoInstall

@octra/annotation

Package Overview
Dependencies
2
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @octra/annotation

library containing annotation related classes and functions used by OCTRA (e.g. file converters)


Version published
Maintainers
1
Created

Readme

Source

@octra/annotation npm

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

FAQs

Last updated on 25 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc