nlptoolkit-framenet 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Frame.js CHANGED
@@ -1,72 +1,86 @@
1
- export class Frame {
2
- /**
3
- * Constructor of {@link Frame} class which takes inputStream as input and reads the frame
4
- *
5
- * @param name Name of the frame
6
- */
7
- constructor(name) {
8
- this.name = name;
9
- this.lexicalUnits = [];
10
- this.frameElements = [];
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
11
5
  }
12
- /**
13
- * Adds a new lexical unit to the current frame
14
- * @param lexicalUnit Lexical unit to be added
15
- */
16
- addLexicalUnit(lexicalUnit) {
17
- this.lexicalUnits.push(lexicalUnit);
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports"], factory);
18
8
  }
19
- /**
20
- * Adds a new frame element to the current frame
21
- * @param frameElement Frame element to be added
22
- */
23
- addFrameElement(frameElement) {
24
- this.frameElements.push(frameElement);
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Frame = void 0;
13
+ class Frame {
14
+ /**
15
+ * Constructor of {@link Frame} class which takes inputStream as input and reads the frame
16
+ *
17
+ * @param name Name of the frame
18
+ */
19
+ constructor(name) {
20
+ this.name = name;
21
+ this.lexicalUnits = [];
22
+ this.frameElements = [];
23
+ }
24
+ /**
25
+ * Adds a new lexical unit to the current frame
26
+ * @param lexicalUnit Lexical unit to be added
27
+ */
28
+ addLexicalUnit(lexicalUnit) {
29
+ this.lexicalUnits.push(lexicalUnit);
30
+ }
31
+ /**
32
+ * Adds a new frame element to the current frame
33
+ * @param frameElement Frame element to be added
34
+ */
35
+ addFrameElement(frameElement) {
36
+ this.frameElements.push(frameElement);
37
+ }
38
+ /**
39
+ * Checks if the given lexical unit exists in the current frame
40
+ * @param lexicalUnit Lexical unit to be searched.
41
+ * @return True if the lexical unit exists, false otherwise.
42
+ */
43
+ lexicalUnitExists(lexicalUnit) {
44
+ return this.lexicalUnits.includes(lexicalUnit);
45
+ }
46
+ /**
47
+ * Accessor for a given index in the lexicalUnit array.
48
+ * @param index Index of the lexical unit
49
+ * @return The lexical unit at position index in the lexicalUnit array
50
+ */
51
+ getLexicalUnit(index) {
52
+ return this.lexicalUnits[index];
53
+ }
54
+ /**
55
+ * Accessor for a given index in the frameElements array.
56
+ * @param index Index of the frame element
57
+ * @return The frame element at position index in the frameElements array
58
+ */
59
+ getFrameElement(index) {
60
+ return this.frameElements[index];
61
+ }
62
+ /**
63
+ * Returns number of lexical units in the current frame
64
+ * @return Number of lexical units in the current frame
65
+ */
66
+ lexicalUnitSize() {
67
+ return this.lexicalUnits.length;
68
+ }
69
+ /**
70
+ * Returns number of frame elements in the current frame
71
+ * @return Number of frame elements in the current frame
72
+ */
73
+ frameElementSize() {
74
+ return this.frameElements.length;
75
+ }
76
+ /**
77
+ * Accessor for the name of the frame
78
+ * @return Name of the frame
79
+ */
80
+ getName() {
81
+ return this.name;
82
+ }
25
83
  }
26
- /**
27
- * Checks if the given lexical unit exists in the current frame
28
- * @param lexicalUnit Lexical unit to be searched.
29
- * @return True if the lexical unit exists, false otherwise.
30
- */
31
- lexicalUnitExists(lexicalUnit) {
32
- return this.lexicalUnits.includes(lexicalUnit);
33
- }
34
- /**
35
- * Accessor for a given index in the lexicalUnit array.
36
- * @param index Index of the lexical unit
37
- * @return The lexical unit at position index in the lexicalUnit array
38
- */
39
- getLexicalUnit(index) {
40
- return this.lexicalUnits[index];
41
- }
42
- /**
43
- * Accessor for a given index in the frameElements array.
44
- * @param index Index of the frame element
45
- * @return The frame element at position index in the frameElements array
46
- */
47
- getFrameElement(index) {
48
- return this.frameElements[index];
49
- }
50
- /**
51
- * Returns number of lexical units in the current frame
52
- * @return Number of lexical units in the current frame
53
- */
54
- lexicalUnitSize() {
55
- return this.lexicalUnits.length;
56
- }
57
- /**
58
- * Returns number of frame elements in the current frame
59
- * @return Number of frame elements in the current frame
60
- */
61
- frameElementSize() {
62
- return this.frameElements.length;
63
- }
64
- /**
65
- * Accessor for the name of the frame
66
- * @return Name of the frame
67
- */
68
- getName() {
69
- return this.name;
70
- }
71
- }
84
+ exports.Frame = Frame;
85
+ });
72
86
  //# sourceMappingURL=Frame.js.map
package/dist/Frame.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Frame.js","sourceRoot":"","sources":["../source/Frame.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,KAAK;IAMd;;;;OAIG;IACH,YAAY,IAAY;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;QACtB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,cAAc,CAAC,WAAmB;QAC9B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IACvC,CAAC;IAED;;;OAGG;IACH,eAAe,CAAC,YAAoB;QAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IACzC,CAAC;IAED;;;;OAIG;IACH,iBAAiB,CAAC,WAAmB;QACjC,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;IAClD,CAAC;IAED;;;;OAIG;IACH,cAAc,CAAC,KAAa;QACxB,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IACnC,CAAC;IAED;;;;OAIG;IACH,eAAe,CAAC,KAAa;QACzB,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IACpC,CAAC;IAED;;;OAGG;IACH,eAAe;QACX,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAA;IACnC,CAAC;IAED;;;OAGG;IACH,gBAAgB;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAA;IACpC,CAAC;IAED;;;OAGG;IACH,OAAO;QACH,OAAO,IAAI,CAAC,IAAI,CAAA;IACpB,CAAC;CACJ"}
1
+ {"version":3,"file":"Frame.js","sourceRoot":"","sources":["../source/Frame.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,MAAa,KAAK;QAMd;;;;WAIG;QACH,YAAY,IAAY;YACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;YAChB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;YACtB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAA;QAC3B,CAAC;QAED;;;WAGG;QACH,cAAc,CAAC,WAAmB;YAC9B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACvC,CAAC;QAED;;;WAGG;QACH,eAAe,CAAC,YAAoB;YAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QACzC,CAAC;QAED;;;;WAIG;QACH,iBAAiB,CAAC,WAAmB;YACjC,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;QAClD,CAAC;QAED;;;;WAIG;QACH,cAAc,CAAC,KAAa;YACxB,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QACnC,CAAC;QAED;;;;WAIG;QACH,eAAe,CAAC,KAAa;YACzB,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACpC,CAAC;QAED;;;WAGG;QACH,eAAe;YACX,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAA;QACnC,CAAC;QAED;;;WAGG;QACH,gBAAgB;YACZ,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAA;QACpC,CAAC;QAED;;;WAGG;QACH,OAAO;YACH,OAAO,IAAI,CAAC,IAAI,CAAA;QACpB,CAAC;KACJ;IAnFD,sBAmFC"}
@@ -1,76 +1,90 @@
1
- export class FrameElement {
2
- /**
3
- * A constructor of {@link FrameElement} class which takes frameElement string which is in the form of frameElementType$id
4
- * and parses this string into frameElementType and id. If the frameElement string does not contain '$' then the
5
- * constructor return a NONE type frameElement.
6
- *
7
- * @param frameElement Argument string containing the argumentType and id
8
- * @param frame Frame of the frameElement
9
- * @param id Id of the frameElement
10
- */
11
- constructor(frameElement, frame, id) {
12
- if (frame == undefined) {
13
- if (frameElement.includes("$")) {
14
- this.frameElementType = frameElement.substr(0, frameElement.indexOf("$"));
15
- this.frame = frameElement.substring(frameElement.indexOf("$") + 1, frameElement.lastIndexOf("$"));
16
- this.id = frameElement.substring(frameElement.lastIndexOf("$") + 1);
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FrameElement = void 0;
13
+ class FrameElement {
14
+ /**
15
+ * A constructor of {@link FrameElement} class which takes frameElement string which is in the form of frameElementType$id
16
+ * and parses this string into frameElementType and id. If the frameElement string does not contain '$' then the
17
+ * constructor return a NONE type frameElement.
18
+ *
19
+ * @param frameElement Argument string containing the argumentType and id
20
+ * @param frame Frame of the frameElement
21
+ * @param id Id of the frameElement
22
+ */
23
+ constructor(frameElement, frame, id) {
24
+ if (frame == undefined) {
25
+ if (frameElement.includes("$")) {
26
+ this.frameElementType = frameElement.substr(0, frameElement.indexOf("$"));
27
+ this.frame = frameElement.substring(frameElement.indexOf("$") + 1, frameElement.lastIndexOf("$"));
28
+ this.id = frameElement.substring(frameElement.lastIndexOf("$") + 1);
29
+ }
30
+ else {
31
+ this.frameElementType = "NONE";
32
+ }
17
33
  }
18
34
  else {
19
- this.frameElementType = "NONE";
35
+ this.frameElementType = frameElement;
36
+ this.frame = frame;
37
+ this.id = id;
20
38
  }
21
39
  }
22
- else {
23
- this.frameElementType = frameElement;
24
- this.frame = frame;
25
- this.id = id;
26
- }
27
- }
28
- /**
29
- * Accessor for frameElementType.
30
- *
31
- * @return frameElementType.
32
- */
33
- getFrameElementType() {
34
- return this.frameElementType;
35
- }
36
- /**
37
- * Accessor for frame.
38
- *
39
- * @return frame.
40
- */
41
- getFrame() {
42
- return this.frame;
43
- }
44
- /**
45
- * Accessor for id.
46
- *
47
- * @return id.
48
- */
49
- getId() {
50
- return this.id;
51
- }
52
- /**
53
- * Mutator for id.
54
- *
55
- * @param id New id.
56
- * @return id.
57
- */
58
- setId(id) {
59
- this.id = id;
60
- }
61
- /**
62
- * toString converts an {@link FrameElement} to a string. If the frameElementType is "NONE" returns only "NONE", otherwise
63
- * it returns argument string which is in the form of frameElementType$id
64
- *
65
- * @return string form of frameElement
66
- */
67
- toString() {
68
- if (this.frameElementType == "NONE") {
40
+ /**
41
+ * Accessor for frameElementType.
42
+ *
43
+ * @return frameElementType.
44
+ */
45
+ getFrameElementType() {
69
46
  return this.frameElementType;
70
47
  }
71
- else {
72
- return this.frameElementType + "$" + this.frame + "$" + this.id;
48
+ /**
49
+ * Accessor for frame.
50
+ *
51
+ * @return frame.
52
+ */
53
+ getFrame() {
54
+ return this.frame;
55
+ }
56
+ /**
57
+ * Accessor for id.
58
+ *
59
+ * @return id.
60
+ */
61
+ getId() {
62
+ return this.id;
63
+ }
64
+ /**
65
+ * Mutator for id.
66
+ *
67
+ * @param id New id.
68
+ * @return id.
69
+ */
70
+ setId(id) {
71
+ this.id = id;
72
+ }
73
+ /**
74
+ * toString converts an {@link FrameElement} to a string. If the frameElementType is "NONE" returns only "NONE", otherwise
75
+ * it returns argument string which is in the form of frameElementType$id
76
+ *
77
+ * @return string form of frameElement
78
+ */
79
+ toString() {
80
+ if (this.frameElementType == "NONE") {
81
+ return this.frameElementType;
82
+ }
83
+ else {
84
+ return this.frameElementType + "$" + this.frame + "$" + this.id;
85
+ }
73
86
  }
74
87
  }
75
- }
88
+ exports.FrameElement = FrameElement;
89
+ });
76
90
  //# sourceMappingURL=FrameElement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FrameElement.js","sourceRoot":"","sources":["../source/FrameElement.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAY;IAMrB;;;;;;;;OAQG;IACH,YAAY,YAAoB,EAAE,KAAc,EAAE,EAAW;QACzD,IAAI,KAAK,IAAI,SAAS,EAAC;YACnB,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAC;gBAC3B,IAAI,CAAC,gBAAgB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;gBACzE,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;gBACjG,IAAI,CAAC,EAAE,GAAG,YAAY,CAAC,SAAS,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;aACtE;iBAAM;gBACH,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAA;aACjC;SACJ;aAAM;YACH,IAAI,CAAC,gBAAgB,GAAG,YAAY,CAAA;YACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;YAClB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;SACf;IACL,CAAC;IAED;;;;OAIG;IACH,mBAAmB;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAChC,CAAC;IAED;;;;OAIG;IACH,QAAQ;QACJ,OAAO,IAAI,CAAC,KAAK,CAAA;IACrB,CAAC;IAED;;;;OAIG;IACH,KAAK;QACD,OAAO,IAAI,CAAC,EAAE,CAAA;IAClB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,EAAU;QACZ,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;IAChB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;;WAIG;QACH,QAAQ;YACJ,OAAO,IAAI,CAAC,KAAK,CAAA;QACrB,CAAC;QAED;;;;WAIG;QACH,KAAK;YACD,OAAO,IAAI,CAAC,EAAE,CAAA;QAClB,CAAC;QAED;;;;;WAKG;QACH,KAAK,CAAC,EAAU;YACZ,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QAChB,CAAC;QAED;;;;;WAKG;QACH,QAAQ;YACJ,IAAI,IAAI,CAAC,gBAAgB,IAAI,MAAM,EAAC;gBAChC,OAAO,IAAI,CAAC,gBAAgB,CAAA;aAC/B;iBAAM;gBACH,OAAO,IAAI,CAAC,gBAAgB,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;aACnE;QACL,CAAC;KACJ;IAjFD,oCAiFC"}
@@ -1,121 +1,135 @@
1
- import { FrameElement } from "./FrameElement";
2
- export class FrameElementList {
3
- /**
4
- * Constructor of frame element list from a string. The frame elements for a word is a concatenated list of
5
- * frame element separated via '#' character.
6
- * @param frameElementList String consisting of frame elements separated with '#' character.
7
- */
8
- constructor(frameElementList) {
9
- this._frameElements = [];
10
- let items = frameElementList.split("#");
11
- for (let item of items) {
12
- this._frameElements.push(new FrameElement(item));
13
- }
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./FrameElement"], factory);
14
8
  }
15
- /**
16
- * Overloaded toString method to convert a frame element list to a string. Concatenates the string forms of all
17
- * frame element with '#' character.
18
- * @return String form of the frame element list.
19
- */
20
- toString() {
21
- if (this._frameElements.length == 0) {
22
- return "NONE";
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FrameElementList = void 0;
13
+ const FrameElement_1 = require("./FrameElement");
14
+ class FrameElementList {
15
+ /**
16
+ * Constructor of frame element list from a string. The frame elements for a word is a concatenated list of
17
+ * frame element separated via '#' character.
18
+ * @param frameElementList String consisting of frame elements separated with '#' character.
19
+ */
20
+ constructor(frameElementList) {
21
+ this._frameElements = [];
22
+ let items = frameElementList.split("#");
23
+ for (let item of items) {
24
+ this._frameElements.push(new FrameElement_1.FrameElement(item));
25
+ }
23
26
  }
24
- else {
25
- let result = this._frameElements[0].toString();
26
- for (let i = 1; i < this._frameElements.length; i++) {
27
- result += "#" + this._frameElements[i].toString();
27
+ /**
28
+ * Overloaded toString method to convert a frame element list to a string. Concatenates the string forms of all
29
+ * frame element with '#' character.
30
+ * @return String form of the frame element list.
31
+ */
32
+ toString() {
33
+ if (this._frameElements.length == 0) {
34
+ return "NONE";
35
+ }
36
+ else {
37
+ let result = this._frameElements[0].toString();
38
+ for (let i = 1; i < this._frameElements.length; i++) {
39
+ result += "#" + this._frameElements[i].toString();
40
+ }
41
+ return result;
28
42
  }
29
- return result;
30
43
  }
31
- }
32
- /**
33
- * Replaces id's of predicates, which have previousId as synset id, with currentId.
34
- * @param previousId Previous id of the synset.
35
- * @param currentId Replacement id.
36
- */
37
- updateConnectedId(previousId, currentId) {
38
- for (let frameElement of this._frameElements) {
39
- if (frameElement.getId() == previousId) {
40
- frameElement.setId(currentId);
44
+ /**
45
+ * Replaces id's of predicates, which have previousId as synset id, with currentId.
46
+ * @param previousId Previous id of the synset.
47
+ * @param currentId Replacement id.
48
+ */
49
+ updateConnectedId(previousId, currentId) {
50
+ for (let frameElement of this._frameElements) {
51
+ if (frameElement.getId() == previousId) {
52
+ frameElement.setId(currentId);
53
+ }
41
54
  }
42
55
  }
43
- }
44
- /**
45
- * Adds a predicate argument to the frame element list of this word.
46
- * @param predicateId Synset id of this predicate.
47
- */
48
- addPredicate(predicateId) {
49
- if (this._frameElements.length != 0 && this._frameElements[0].getFrameElementType() == "NONE") {
50
- this._frameElements.shift();
56
+ /**
57
+ * Adds a predicate argument to the frame element list of this word.
58
+ * @param predicateId Synset id of this predicate.
59
+ */
60
+ addPredicate(predicateId) {
61
+ if (this._frameElements.length != 0 && this._frameElements[0].getFrameElementType() == "NONE") {
62
+ this._frameElements.shift();
63
+ }
64
+ this._frameElements.push(new FrameElement_1.FrameElement("PREDICATE", "NONE", predicateId));
51
65
  }
52
- this._frameElements.push(new FrameElement("PREDICATE", "NONE", predicateId));
53
- }
54
- /**
55
- * Removes the predicate with the given predicate id.
56
- */
57
- removePredicate() {
58
- let i = 0;
59
- for (let frameElement of this._frameElements) {
60
- if (frameElement.getFrameElementType() == "PREDICATE") {
61
- this._frameElements.splice(i, 1);
62
- break;
66
+ /**
67
+ * Removes the predicate with the given predicate id.
68
+ */
69
+ removePredicate() {
70
+ let i = 0;
71
+ for (let frameElement of this._frameElements) {
72
+ if (frameElement.getFrameElementType() == "PREDICATE") {
73
+ this._frameElements.splice(i, 1);
74
+ break;
75
+ }
76
+ i++;
63
77
  }
64
- i++;
65
78
  }
66
- }
67
- /**
68
- * Checks if one of the frame elements is a predicate.
69
- * @return True, if one of the frame elements is predicate; false otherwise.
70
- */
71
- containsPredicate() {
72
- for (let frameElement of this._frameElements) {
73
- if (frameElement.getFrameElementType() == "PREDICATE") {
74
- return true;
79
+ /**
80
+ * Checks if one of the frame elements is a predicate.
81
+ * @return True, if one of the frame elements is predicate; false otherwise.
82
+ */
83
+ containsPredicate() {
84
+ for (let frameElement of this._frameElements) {
85
+ if (frameElement.getFrameElementType() == "PREDICATE") {
86
+ return true;
87
+ }
75
88
  }
89
+ return false;
76
90
  }
77
- return false;
78
- }
79
- /**
80
- * Checks if one of the frame element is a predicate with the given id.
81
- * @param predicateId Synset id to check.
82
- * @return True, if one of the frame element is predicate; false otherwise.
83
- */
84
- containsPredicateWithId(predicateId) {
85
- for (let frameElement of this._frameElements) {
86
- if (frameElement.getFrameElementType() == "PREDICATE" && frameElement.getId() == predicateId) {
87
- return true;
91
+ /**
92
+ * Checks if one of the frame element is a predicate with the given id.
93
+ * @param predicateId Synset id to check.
94
+ * @return True, if one of the frame element is predicate; false otherwise.
95
+ */
96
+ containsPredicateWithId(predicateId) {
97
+ for (let frameElement of this._frameElements) {
98
+ if (frameElement.getFrameElementType() == "PREDICATE" && frameElement.getId() == predicateId) {
99
+ return true;
100
+ }
88
101
  }
102
+ return false;
89
103
  }
90
- return false;
91
- }
92
- /**
93
- * Returns the frame elements as an array list of strings.
94
- * @return Frame elements as an array list of strings.
95
- */
96
- getFrameElements() {
97
- let result = [];
98
- for (let frameElement of this._frameElements) {
99
- result.push(frameElement.toString());
104
+ /**
105
+ * Returns the frame elements as an array list of strings.
106
+ * @return Frame elements as an array list of strings.
107
+ */
108
+ getFrameElements() {
109
+ let result = [];
110
+ for (let frameElement of this._frameElements) {
111
+ result.push(frameElement.toString());
112
+ }
113
+ return result;
100
114
  }
101
- return result;
102
- }
103
- /**
104
- * Checks if the given argument with the given type and id exists or not.
105
- * @param frameElementType Type of the frame element to search for.
106
- * @param frame frame Name of the frame to search for
107
- * @param id Id of the frame element to search for.
108
- * @return True if the frame element exists, false otherwise.
109
- */
110
- containsFrameElement(frameElementType, frame, id) {
111
- for (let frameElement of this._frameElements) {
112
- if (frameElement.getFrameElementType() == frameElementType &&
113
- frameElement.getFrame() == frame &&
114
- frameElement.getId() == id) {
115
- return true;
115
+ /**
116
+ * Checks if the given argument with the given type and id exists or not.
117
+ * @param frameElementType Type of the frame element to search for.
118
+ * @param frame frame Name of the frame to search for
119
+ * @param id Id of the frame element to search for.
120
+ * @return True if the frame element exists, false otherwise.
121
+ */
122
+ containsFrameElement(frameElementType, frame, id) {
123
+ for (let frameElement of this._frameElements) {
124
+ if (frameElement.getFrameElementType() == frameElementType &&
125
+ frameElement.getFrame() == frame &&
126
+ frameElement.getId() == id) {
127
+ return true;
128
+ }
116
129
  }
130
+ return false;
117
131
  }
118
- return false;
119
132
  }
120
- }
133
+ exports.FrameElementList = FrameElementList;
134
+ });
121
135
  //# sourceMappingURL=FrameElementList.js.map
@@ -1 +1 @@
1
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BAAmB,EAAE,IAAI,WAAW,IAAI,YAAY,CAAC,KAAK,EAAE,IAAI,WAAW,EAAC;oBACzF,OAAO,IAAI,CAAC;iBACf;aACJ;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;QAED;;;WAGG;QACH,gBAAgB;YACZ,IAAI,MAAM,GAAG,EAAE,CAAA;YACf,KAAK,IAAI,YAAY,IAAI,IAAI,CAAC,cAAc,EAAE;gBAC1C,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;aACxC;YACD,OAAO,MAAM,CAAC;QAClB,CAAC;QAED;;;;;;WAMG;QACH,oBAAoB,CAAC,gBAAwB,EAAE,KAAa,EAAE,EAAU;YACpE,KAAK,IAAI,YAAY,IAAI,IAAI,CAAC,cAAc,EAAE;gBAC1C,IAAI,YAAY,CAAC,mBAAmB,EAAE,IAAI,gBAAgB;oBACtD,YAAY,CAAC,QAAQ,EAAE,IAAI,KAAK;oBAChC,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,EAAC;oBAC3B,OAAO,IAAI,CAAC;iBACf;aACJ;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KACJ;IAhID,4CAgIC"}
package/dist/FrameNet.js CHANGED
@@ -1,76 +1,90 @@
1
- import { Frame } from "./Frame";
2
- import { XmlDocument } from "nlptoolkit-xmlparser/dist/XmlDocument";
3
- export class FrameNet {
4
- /**
5
- * A constructor of {@link FrameNet} class which reads all frame files inside the files2.txt file. For each
6
- * filename inside that file, the constructor creates a FrameNet.Frame and puts in inside the frames {@link ArrayList}.
7
- */
8
- constructor() {
9
- let xmlDocument;
10
- xmlDocument = new XmlDocument("framenet.xml");
11
- xmlDocument.parse();
12
- this.frames = [];
13
- let rootNode = xmlDocument.getFirstChild();
14
- let frameNode = rootNode.getFirstChild();
15
- while (frameNode != undefined) {
16
- let currentFrame = new Frame(frameNode.getAttributeValue("NAME"));
17
- let lexicalUnits = frameNode.getFirstChild();
18
- let lexicalUnit = lexicalUnits.getFirstChild();
19
- while (lexicalUnit != undefined) {
20
- currentFrame.addLexicalUnit(lexicalUnit.getPcData());
21
- lexicalUnit = lexicalUnit.getNextSibling();
22
- }
23
- let frameElements = lexicalUnits.getNextSibling();
24
- let frameElement = frameElements.getFirstChild();
25
- while (frameElement != undefined) {
26
- currentFrame.addFrameElement(frameElement.getPcData());
27
- frameElement = frameElement.getNextSibling();
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Frame", "nlptoolkit-xmlparser/dist/XmlDocument"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FrameNet = void 0;
13
+ const Frame_1 = require("./Frame");
14
+ const XmlDocument_1 = require("nlptoolkit-xmlparser/dist/XmlDocument");
15
+ class FrameNet {
16
+ /**
17
+ * A constructor of {@link FrameNet} class which reads all frame files inside the files2.txt file. For each
18
+ * filename inside that file, the constructor creates a FrameNet.Frame and puts in inside the frames {@link ArrayList}.
19
+ */
20
+ constructor() {
21
+ let xmlDocument;
22
+ xmlDocument = new XmlDocument_1.XmlDocument("framenet.xml");
23
+ xmlDocument.parse();
24
+ this.frames = [];
25
+ let rootNode = xmlDocument.getFirstChild();
26
+ let frameNode = rootNode.getFirstChild();
27
+ while (frameNode != undefined) {
28
+ let currentFrame = new Frame_1.Frame(frameNode.getAttributeValue("NAME"));
29
+ let lexicalUnits = frameNode.getFirstChild();
30
+ let lexicalUnit = lexicalUnits.getFirstChild();
31
+ while (lexicalUnit != undefined) {
32
+ currentFrame.addLexicalUnit(lexicalUnit.getPcData());
33
+ lexicalUnit = lexicalUnit.getNextSibling();
34
+ }
35
+ let frameElements = lexicalUnits.getNextSibling();
36
+ let frameElement = frameElements.getFirstChild();
37
+ while (frameElement != undefined) {
38
+ currentFrame.addFrameElement(frameElement.getPcData());
39
+ frameElement = frameElement.getNextSibling();
40
+ }
41
+ this.frames.push(currentFrame);
42
+ frameNode = frameNode.getNextSibling();
28
43
  }
29
- this.frames.push(currentFrame);
30
- frameNode = frameNode.getNextSibling();
31
44
  }
32
- }
33
- /**
34
- * Checks if the given lexical unit exists in any frame in the frame set.
35
- * @param synSetId Id of the lexical unit
36
- * @return True if any frame contains the given lexical unit, false otherwise.
37
- */
38
- lexicalUnitExists(synSetId) {
39
- for (let frame of this.frames) {
40
- if (frame.lexicalUnitExists(synSetId)) {
41
- return true;
45
+ /**
46
+ * Checks if the given lexical unit exists in any frame in the frame set.
47
+ * @param synSetId Id of the lexical unit
48
+ * @return True if any frame contains the given lexical unit, false otherwise.
49
+ */
50
+ lexicalUnitExists(synSetId) {
51
+ for (let frame of this.frames) {
52
+ if (frame.lexicalUnitExists(synSetId)) {
53
+ return true;
54
+ }
42
55
  }
56
+ return false;
43
57
  }
44
- return false;
45
- }
46
- /**
47
- * Returns an array of frames that contain the given lexical unit in their lexical units
48
- * @param synSetId Id of the lexical unit.
49
- * @return An array of frames that contains the given lexical unit.
50
- */
51
- getFrames(synSetId) {
52
- var result = [];
53
- for (let frame of this.frames) {
54
- if (frame.lexicalUnitExists(synSetId)) {
55
- result.push(frame);
58
+ /**
59
+ * Returns an array of frames that contain the given lexical unit in their lexical units
60
+ * @param synSetId Id of the lexical unit.
61
+ * @return An array of frames that contains the given lexical unit.
62
+ */
63
+ getFrames(synSetId) {
64
+ var result = [];
65
+ for (let frame of this.frames) {
66
+ if (frame.lexicalUnitExists(synSetId)) {
67
+ result.push(frame);
68
+ }
56
69
  }
70
+ return result;
71
+ }
72
+ /**
73
+ * Returns number of frames in the frame set.
74
+ * @return Number of frames in the frame set.
75
+ */
76
+ size() {
77
+ return this.frames.length;
78
+ }
79
+ /**
80
+ * Returns the element at the specified position in the frame list.
81
+ * @param index index of the element to return
82
+ * @return The element at the specified position in the frame list.
83
+ */
84
+ getFrame(index) {
85
+ return this.frames[index];
57
86
  }
58
- return result;
59
- }
60
- /**
61
- * Returns number of frames in the frame set.
62
- * @return Number of frames in the frame set.
63
- */
64
- size() {
65
- return this.frames.length;
66
- }
67
- /**
68
- * Returns the element at the specified position in the frame list.
69
- * @param index index of the element to return
70
- * @return The element at the specified position in the frame list.
71
- */
72
- getFrame(index) {
73
- return this.frames[index];
74
87
  }
75
- }
88
+ exports.FrameNet = FrameNet;
89
+ });
76
90
  //# sourceMappingURL=FrameNet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FrameNet.js","sourceRoot":"","sources":["../source/FrameNet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,WAAW,EAAC,MAAM,uCAAuC,CAAC;AAElE,MAAM,OAAO,QAAQ;IAIjB;;;OAGG;IACH;QACI,IAAI,WAAwB,CAAC;QAC7B,WAAW,GAAG,IAAI,WAAW,CAAC,cAAc,CAAC,CAAA;QAC7C,WAAW,CAAC,KAAK,EAAE,CAAA;QACnB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;QAChB,IAAI,QAAQ,GAAG,WAAW,CAAC,aAAa,EAAE,CAAA;QAC1C,IAAI,SAAS,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAA;QACxC,OAAO,SAAS,IAAI,SAAS,EAAC;YAC1B,IAAI,YAAY,GAAG,IAAI,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAA;YACjE,IAAI,YAAY,GAAG,SAAS,CAAC,aAAa,EAAE,CAAA;YAC5C,IAAI,WAAW,GAAG,YAAY,CAAC,aAAa,EAAE,CAAA;YAC9C,OAAO,WAAW,IAAI,SAAS,EAAC;gBAC5B,YAAY,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,CAAA;gBACpD,WAAW,GAAG,WAAW,CAAC,cAAc,EAAE,CAAA;aAC7C;YACD,IAAI,aAAa,GAAG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AC,EAAC;oBAClC,OAAO,IAAI,CAAA;iBACd;aACJ;YACD,OAAO,KAAK,CAAA;QAChB,CAAC;QAED;;;;WAIG;QACH,SAAS,CAAC,QAAgB;YACtB,IAAI,MAAM,GAAiB,EAAE,CAAA;YAC7B,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,MAAM,EAAC;gBAC1B,IAAI,KAAK,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAC;oBAClC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;iBACrB;aACJ;YACD,OAAO,MAAM,CAAA;QACjB,CAAC;QAED;;;WAGG;QACH,IAAI;YACA,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QAC7B,CAAC;QAED;;;;WAIG;QACH,QAAQ,CAAC,KAAa;YAClB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC7B,CAAC;KACJ;IA/ED,4BA+EC"}
package/dist/index.js CHANGED
@@ -1,5 +1,27 @@
1
- export * from "./Frame";
2
- export * from "./FrameElement";
3
- export * from "./FrameNet";
4
- export * from "./FrameElementList";
1
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
+ if (k2 === undefined) k2 = k;
3
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ }) : (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ o[k2] = m[k];
7
+ }));
8
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
9
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
10
+ };
11
+ (function (factory) {
12
+ if (typeof module === "object" && typeof module.exports === "object") {
13
+ var v = factory(require, exports);
14
+ if (v !== undefined) module.exports = v;
15
+ }
16
+ else if (typeof define === "function" && define.amd) {
17
+ define(["require", "exports", "./Frame", "./FrameElement", "./FrameNet", "./FrameElementList"], factory);
18
+ }
19
+ })(function (require, exports) {
20
+ "use strict";
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ __exportStar(require("./Frame"), exports);
23
+ __exportStar(require("./FrameElement"), exports);
24
+ __exportStar(require("./FrameNet"), exports);
25
+ __exportStar(require("./FrameElementList"), exports);
26
+ });
5
27
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;IAAA,0CAAuB;IACvB,iDAA8B;IAC9B,6CAA0B;IAC1B,qDAAkC"}
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "nlptoolkit-framenet",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Turkish FrameNet Library",
5
- "type": "module",
6
5
  "main": "dist/index.js",
7
6
  "types": "dist/index.d.ts",
8
7
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "outDir": "../dist",
4
- "module": "ES2020",
4
+ "module": "umd",
5
5
  "target": "es2018",
6
6
  "sourceMap": true,
7
7
  "noImplicitAny": true,
package/tsconfig.json CHANGED
@@ -1,7 +1,5 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "module": "umd",
4
- "target": "es2018",
5
3
  "sourceMap": true,
6
4
  "noImplicitAny": true,
7
5
  "strictNullChecks": true,