Giter Club home page Giter Club logo

spacy-nlp-node's Introduction

Spacy for Node.js

This library exposes the parse method of SpaCy to Node.js.

With this library, you can easily parse text in Node.js with SpaCy's industry-leading accuracy.

Installation

To install this library, simply run:

npm install --save spacy-nlp-node

And if needed navigate to the library folder and install the requirements.txt by running:

Use pip, or pip3 which is available.

pip install -r requirements.txt

Usage

To use this library, simply require it and call the parse method:

javascript

import { parse, isReady } from "spacy-nlp-node";
var text = 'This is some text to parse.';

try {
const result = await parse({ text: text, TimeoutLimit: 1000 * 60 });
//Do something with the result
} catch (error) {
//Do something with the error, it could be {error: "No response received, Time out"}
}

The parse method returns a object from SpaCy. Example:

{
text: "",
ents: [{ start: 0, end: 0, label: "" }],
sents: [{ start: 0, end: 0 }],
tokens: [
{
id: 0,
start: 0,
end: 0,
tag: "",
pos: "",
morph: "",
lemma: "",
dep: "",
head: 0,
},
],
}

Models

The model used in this library "for now" is "en_core_web_trf", Will be adding more models to it soon if someone asked for it.

Help

If there is anything that needs fixing or edited, please open an issue. You may also make a feature request.

License

This library is released under the MIT license.

spacy-nlp-node's People

Contributors

kasakee avatar

Stargazers

 avatar Okan Fidan avatar  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.