Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nlptoolkit-annotatedsentence

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlptoolkit-annotatedsentence - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

README.md

2

package.json
{
"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 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc