nlptoolkit-annotatedsentence
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "nlptoolkit-annotatedsentence", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,9 +24,11 @@ import {Sentence} from "nlptoolkit-corpus/dist/Sentence"; | ||
*/ | ||
constructor(fileName: string) { | ||
constructor(fileName?: string) { | ||
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(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(word)) | ||
} | ||
} | ||
@@ -33,0 +35,0 @@ } |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
199606
39
3183
1
130