Skip to content

Commit 02edaf4

Browse files
committed
forcing NOUN type to SUBJ to solve issue #7
1 parent 07bb01d commit 02edaf4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

functions/dependencies.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function isDependant(nodeChild, nodeParent, isHeadOf) { //HERE: this last part prevent for more than one children of the same type to be added as child of the same element, this might be changed later
1+
function isDependant(nodeChild, nodeParent, isHeadOf) {
22
if (isHeadOf[nodeParent.type]){
33
if (isHeadOf[nodeParent.type][nodeChild.type]){
44
const [amt, dir] = isHeadOf[nodeParent.type][nodeChild.type].split(':');
@@ -16,7 +16,7 @@ function isDependant(nodeChild, nodeParent, isHeadOf) { //HERE: this last part p
1616
.filter(e => e.type === nodeChild.type)
1717
.map(e => e.position - nodeParent.position)
1818
.reduce((sum, e) => sum + e, 0)) //sums the element of the array of relative positions
19-
* (nodeChild.position - nodeParent.position) >= 0; //if relative position is the same as the others in the array, the mult will be positive
19+
* (nodeChild.position - nodeParent.position) >= 0; //if relative position is the same as the others in the array, the product will be positive
2020
default:
2121
return true;
2222
}

functions/prepares.js

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ function prepareMetaNOUN(obj, personsPlurals, personsGenders, defaults){
8787
} else {
8888
obj.meta.PERSON = defaults.GENDER;
8989
}
90+
91+
obj.type = 'SUBJ' //HERE: this might be temporary, for now it seems to be no difference between a SUBJ and a NOUN
9092

9193
return obj;
9294
}

0 commit comments

Comments
 (0)