@types/word2vector
TypeScript icon, indicating that this package has built-in type declarations

2.1.3 • Public • Published

Installation

npm install --save @types/word2vector

Summary

This package contains type definitions for word2vector (https://github.com/LeeXun/word2vector#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/word2vector.

index.d.ts

export function w2v(): any;
export function load(modelfile: string, filetype?: string): boolean;
export function getVector(word: string): number[];
export function getVectors(words: string[]): number[][];
export function getNeighbors(vector: number[], opt?: object): object[];
export function getSimilarWords(word: string, options?: object): object[];
export function bin2txt(binFile: string): boolean;
export function add(p1: number[], p2: number[], opt?: object): any;
export function add(p1: string, p2: string, opt?: object): any;
export function substract(p1: string, p2: string, opt?: object): any;
export function substract(p1: number[], p2: number[], opt?: object): any;
export function similarity(w1: string, w2: string, options?: object): any;

export function train(
    trainFile: string,
    modelFile: string,
    options?: object,
    callback?: () => void,
): void;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Rene Keijzer.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/word2vector

Weekly Downloads

5

Version

2.1.3

License

MIT

Unpacked Size

4.33 kB

Total Files

5

Last publish

Collaborators

  • types