fasttext-js
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -9,2 +9,6 @@ 'use strict'; | ||
var _getFastTextPath = require('./getFastTextPath'); | ||
var _getFastTextPath2 = _interopRequireDefault(_getFastTextPath); | ||
var _normalize = require('./normalize'); | ||
@@ -20,3 +24,3 @@ | ||
return new Promise(function (resolve, reject) { | ||
var child = (0, _child_process.spawn)('./fastText/fasttext', ['predict-prob', modelPath, '-']); | ||
var child = (0, _child_process.spawn)((0, _getFastTextPath2.default)(), ['predict-prob', modelPath, '-']); | ||
@@ -23,0 +27,0 @@ var stdout = ''; |
@@ -9,2 +9,8 @@ 'use strict'; | ||
var _getFastTextPath = require('./getFastTextPath'); | ||
var _getFastTextPath2 = _interopRequireDefault(_getFastTextPath); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
// inputTxt: string (filePath) | ||
@@ -17,3 +23,3 @@ // outputModel: string (filePath) | ||
(0, _child_process.execFile)('./fastText/fasttext', ['supervised', '-input', dataPath, '-output', output], function (err) { | ||
(0, _child_process.execFile)((0, _getFastTextPath2.default)(), ['supervised', '-input', dataPath, '-output', output], function (err) { | ||
if (err) { | ||
@@ -20,0 +26,0 @@ if (err) { |
{ | ||
"name": "fasttext-js", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Node.js interface for fastText", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
import { spawn } from 'child_process'; | ||
import getFastTextPath from './getFastTextPath'; | ||
import normalize from './normalize'; | ||
@@ -9,3 +10,3 @@ | ||
new Promise((resolve, reject) => { | ||
const child = spawn('./fastText/fasttext', ['predict-prob', modelPath, '-']); | ||
const child = spawn(getFastTextPath(), ['predict-prob', modelPath, '-']); | ||
@@ -12,0 +13,0 @@ let stdout = ''; |
import { execFile } from 'child_process'; | ||
import getFastTextPath from './getFastTextPath'; | ||
// inputTxt: string (filePath) | ||
@@ -10,3 +12,3 @@ // outputModel: string (filePath) | ||
execFile('./fastText/fasttext', ['supervised', '-input', dataPath, '-output', output], (err) => { | ||
execFile(getFastTextPath(), ['supervised', '-input', dataPath, '-output', output], (err) => { | ||
if (err) { | ||
@@ -13,0 +15,0 @@ if (err) { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
115452
24
238
6