Comparing version 1.0.2 to 1.0.3
@@ -27,5 +27,5 @@ const chunk = require("./chunk/index.js"); | ||
function toArray(jsonTree,master,arr){ | ||
function toArray(jsonTree,parent,arr){ | ||
if(!arr) arr = []; | ||
if(master === undefined) master = -1; | ||
if(parent === undefined) parent = -1; | ||
var length = jsonTree.index[1] - jsonTree.index[0] + 1; | ||
@@ -35,6 +35,6 @@ while(length){ | ||
var thisLabel = jsonTree.label; | ||
var thisMaster = master; | ||
var thisParent = parent; | ||
if(pos !== jsonTree.index[1]) { | ||
thisLabel = "MWE"; | ||
thisMaster = jsonTree.index[1]; | ||
thisParent = jsonTree.index[1]; | ||
} | ||
@@ -44,3 +44,3 @@ arr[pos] = { | ||
type:jsonTree.type, | ||
master:thisMaster, | ||
parent:thisParent, | ||
}; | ||
@@ -47,0 +47,0 @@ length--; |
{ | ||
"name": "en-parse", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "English language syntactic dependency parser", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -12,3 +12,3 @@ const cases = require("./cases.js"); | ||
var tags = pos(sample).tags; | ||
var parsed = parser(tags,sample); | ||
var parsed = parser(tags,sample,true); | ||
if(parsed.length>1) { | ||
@@ -22,2 +22,3 @@ visualize(sample,index+2,true); | ||
return; | ||
const expected = require('./results.json'); | ||
@@ -24,0 +25,0 @@ var isEqual = require('lodash.isequal'); |
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
569098
18275