1.0.9 • Published 1 year ago

dropsuit-bowtag v1.0.9

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

npm version npm License

Overview of DropSuit NLP and the bowtag Function

DropSuit NLP is an open-source JavaScript and Node.js library offering diverse functions for natural language processing and data manipulation. The bowtag function is one of its modules, designed for generating a bag of words from input and data structure intent tags. It is available under the Apache License 2.0.

DropSuit NLP Method: A JavaScript and Node.js function for generating a bag of words from input and data structure intent tags

The bowtag function is a part of the DropSuit NLP library, it's a JavaScript and Node.js function that generates a bag of words from input and data structure intent tags. It accepts a boolean parameter to enable or disable stemming. It's open-source and available under the Apache License 2.0.

Installation

Add the library function by installing it via npm:

npm install dropsuit-bowtag

Usage

Import the library in your project:

const dropsuit_bowtag = require("dropsuit-bowtag");

Process intents.json using 'jsonIntStrct' function:

const json_data = require("dropsuit-bowtag/jsobj.js");
let intentData = json_data.jsonIntStrct("assets/json/intents.json");

Set boolean parameter (true/false) argument value to display console log processing results output information in terminal:

let dsbowtag = new dropsuit_bowtag(intentData.req_arr, intentData.tag_arr, intentData.res_arr, false);

bowtag(boolean)

  • array: Processes default object instance json key value (req_arr: requests), (tag_arr: tags) array patterns.
  • boolean: (true/false) Enable or disable stemming.

Return option:

  • tagsbt() Bag of words.
  • bowtbt() Tags IDx value sequence arrays.
let out = dsbowtag.bowtag(false);
console.log(out);

Return object instance:

Output:

 {
  size_bt: 6,
  bow_bt: [
    [
      2, 1, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0
    ],
    [
      0, 0, 2, 1, 1, 0, 0,
      0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0
    ],
    [
      0, 0, 0, 0, 0, 1, 1,
      2, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0
    ],
    [
      0, 0, 0, 0, 1, 0, 0,
      0, 1, 2, 1, 1, 1, 0,
      0, 0, 0, 0
    ],
    [
      0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 2,
      1, 1, 0, 0
    ],
    [
      0, 0, 0, 0, 1, 0, 0,
      0, 0, 0, 0, 0, 0, 1,
      0, 0, 1, 1
    ]
  ],
  tag_bt: [ 0, 0, 1, 1, 2, 2 ],
  bowtbt: [Function: bowtbt],
  tagsbt: [Function: tagsbt]
}

Links

Supporting DropSuit

DropSuit is an open-source library and I am dedicated to ensuring its continued development and improvement. If you have any questions, feedback, or encounter any issues, please reach out through the support via PayPal, and read more about support details.

Your support is crucial for the library's success. You can also contribute to the project by submitting bug reports, feature requests, or by providing feedback. Sharing the library with others who may find it useful and giving it a star on GitHub are also great ways to show your support. Thank you for using DropSuit!

License

Apache License 2.0

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago