nlptoolkit-annotatedsentence
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -17,3 +17,3 @@ import { Sentence } from "nlptoolkit-corpus/dist/Sentence"; | ||
*/ | ||
constructor(fileName: string); | ||
constructor(fileName?: string); | ||
/** | ||
@@ -20,0 +20,0 @@ * Returns file name of the sentence |
@@ -25,7 +25,9 @@ (function (factory) { | ||
super(); | ||
this.file = fileName; | ||
let data = fs.readFileSync(fileName, 'utf8'); | ||
let wordList = data.split("\n")[0].split(" "); | ||
for (let word of wordList) { | ||
this.words.push(new AnnotatedWord_1.AnnotatedWord(word)); | ||
if (fileName != undefined) { | ||
this.file = fileName; | ||
let data = fs.readFileSync(fileName, 'utf8'); | ||
let wordList = data.split("\n")[0].split(" "); | ||
for (let word of wordList) { | ||
this.words.push(new AnnotatedWord_1.AnnotatedWord(word)); | ||
} | ||
} | ||
@@ -32,0 +34,0 @@ } |
{ | ||
"name": "nlptoolkit-annotatedsentence", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
199727
3185