Code Monkey home page Code Monkey logo

web-crfsuite's Introduction

web-crfsuite

A port of crfsuite for Node, Browser & Deno

Usage

import CRFSuite from "web-crfsuite";

// training example
const trainer = new CRFSuite.Trainer();
const xseq = [['walk'], ['walk', 'shop'], ['clean', 'shop']];
const yseq = ['sunny', 'sunny', 'rainy'];

trainer.append(xseq, yseq);

// virtual file system
trainer.train("/model.crfsuite");

const buffer = FS.readFile("/model.crfsuite");

// tagging example
const tagger = new CRFSuite.Tagger();

// writing to the virtual file system
FS.writeFile("/model.crfsuite", buffer);

const result = tagger.tag(xseq);
// => [ 'sunny', 'sunny', 'rainy' ]

Building

Make sure you've Emscripten sdk install on your environment.

  1. Clone the project
git clone --recursive https://[email protected]:seanghay/web-crfsuite.git
  1. Compile & Build
npm install
npm run build

It will create a folder called build in the current directory with the output files.

References

Without these awesome projects from the community, this wouldn't be possible.

web-crfsuite's People

Contributors

seanghay avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.