nlptoolkit-annotatedtree 1.0.0
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/README.md +153 -0
- package/dist/ChunkType.d.ts +5 -0
- package/dist/ChunkType.js +20 -0
- package/dist/ChunkType.js.map +1 -0
- package/dist/Layer/DependencyLayer.d.ts +4 -0
- package/dist/Layer/DependencyLayer.js +23 -0
- package/dist/Layer/DependencyLayer.js.map +1 -0
- package/dist/Layer/EnglishPropbankLayer.d.ts +6 -0
- package/dist/Layer/EnglishPropbankLayer.js +34 -0
- package/dist/Layer/EnglishPropbankLayer.js.map +1 -0
- package/dist/Layer/EnglishSemanticLayer.d.ts +4 -0
- package/dist/Layer/EnglishSemanticLayer.js +23 -0
- package/dist/Layer/EnglishSemanticLayer.js.map +1 -0
- package/dist/Layer/EnglishWordLayer.d.ts +4 -0
- package/dist/Layer/EnglishWordLayer.js +22 -0
- package/dist/Layer/EnglishWordLayer.js.map +1 -0
- package/dist/Layer/MetaMorphemeLayer.d.ts +8 -0
- package/dist/Layer/MetaMorphemeLayer.js +63 -0
- package/dist/Layer/MetaMorphemeLayer.js.map +1 -0
- package/dist/Layer/MetaMorphemesMovedLayer.d.ts +9 -0
- package/dist/Layer/MetaMorphemesMovedLayer.js +51 -0
- package/dist/Layer/MetaMorphemesMovedLayer.js.map +1 -0
- package/dist/Layer/MorphologicalAnalysisLayer.d.ts +11 -0
- package/dist/Layer/MorphologicalAnalysisLayer.js +110 -0
- package/dist/Layer/MorphologicalAnalysisLayer.js.map +1 -0
- package/dist/Layer/MultiWordLayer.d.ts +7 -0
- package/dist/Layer/MultiWordLayer.js +33 -0
- package/dist/Layer/MultiWordLayer.js.map +1 -0
- package/dist/Layer/MultiWordMultiItemLayer.d.ts +6 -0
- package/dist/Layer/MultiWordMultiItemLayer.js +18 -0
- package/dist/Layer/MultiWordMultiItemLayer.js.map +1 -0
- package/dist/Layer/NERLayer.d.ts +8 -0
- package/dist/Layer/NERLayer.js +32 -0
- package/dist/Layer/NERLayer.js.map +1 -0
- package/dist/Layer/PersianWordLayer.d.ts +4 -0
- package/dist/Layer/PersianWordLayer.js +22 -0
- package/dist/Layer/PersianWordLayer.js.map +1 -0
- package/dist/Layer/ShallowParseLayer.d.ts +5 -0
- package/dist/Layer/ShallowParseLayer.js +33 -0
- package/dist/Layer/ShallowParseLayer.js.map +1 -0
- package/dist/Layer/SingleWordLayer.d.ts +4 -0
- package/dist/Layer/SingleWordLayer.js +21 -0
- package/dist/Layer/SingleWordLayer.js.map +1 -0
- package/dist/Layer/SingleWordMultiItemLayer.d.ts +7 -0
- package/dist/Layer/SingleWordMultiItemLayer.js +33 -0
- package/dist/Layer/SingleWordMultiItemLayer.js.map +1 -0
- package/dist/Layer/SourceLanguageWordLayer.d.ts +4 -0
- package/dist/Layer/SourceLanguageWordLayer.js +22 -0
- package/dist/Layer/SourceLanguageWordLayer.js.map +1 -0
- package/dist/Layer/TargetLanguageWordLayer.d.ts +8 -0
- package/dist/Layer/TargetLanguageWordLayer.js +38 -0
- package/dist/Layer/TargetLanguageWordLayer.js.map +1 -0
- package/dist/Layer/TurkishPropbankLayer.d.ts +9 -0
- package/dist/Layer/TurkishPropbankLayer.js +35 -0
- package/dist/Layer/TurkishPropbankLayer.js.map +1 -0
- package/dist/Layer/TurkishSemanticLayer.d.ts +5 -0
- package/dist/Layer/TurkishSemanticLayer.js +33 -0
- package/dist/Layer/TurkishSemanticLayer.js.map +1 -0
- package/dist/Layer/TurkishWordLayer.d.ts +4 -0
- package/dist/Layer/TurkishWordLayer.js +22 -0
- package/dist/Layer/TurkishWordLayer.js.map +1 -0
- package/dist/Layer/WordLayer.d.ts +7 -0
- package/dist/Layer/WordLayer.js +26 -0
- package/dist/Layer/WordLayer.js.map +1 -0
- package/dist/LayerInfo.d.ts +45 -0
- package/dist/LayerInfo.js +474 -0
- package/dist/LayerInfo.js.map +1 -0
- package/dist/ParseNodeDrawable.d.ts +30 -0
- package/dist/ParseNodeDrawable.js +263 -0
- package/dist/ParseNodeDrawable.js.map +1 -0
- package/dist/ParseTreeDrawable.d.ts +31 -0
- package/dist/ParseTreeDrawable.js +200 -0
- package/dist/ParseTreeDrawable.js.map +1 -0
- package/dist/Processor/Condition/IsDoubleNode.d.ts +5 -0
- package/dist/Processor/Condition/IsDoubleNode.js +23 -0
- package/dist/Processor/Condition/IsDoubleNode.js.map +1 -0
- package/dist/Processor/Condition/IsDoubleNodeWithDifferentTags.d.ts +5 -0
- package/dist/Processor/Condition/IsDoubleNodeWithDifferentTags.js +23 -0
- package/dist/Processor/Condition/IsDoubleNodeWithDifferentTags.js.map +1 -0
- package/dist/Processor/Condition/IsEnglishLeafNode.d.ts +5 -0
- package/dist/Processor/Condition/IsEnglishLeafNode.js +25 -0
- package/dist/Processor/Condition/IsEnglishLeafNode.js.map +1 -0
- package/dist/Processor/Condition/IsLeafNode.d.ts +5 -0
- package/dist/Processor/Condition/IsLeafNode.js +20 -0
- package/dist/Processor/Condition/IsLeafNode.js.map +1 -0
- package/dist/Processor/Condition/IsNodeWithPredicate.d.ts +6 -0
- package/dist/Processor/Condition/IsNodeWithPredicate.js +29 -0
- package/dist/Processor/Condition/IsNodeWithPredicate.js.map +1 -0
- package/dist/Processor/Condition/IsNodeWithSymbol.d.ts +7 -0
- package/dist/Processor/Condition/IsNodeWithSymbol.js +28 -0
- package/dist/Processor/Condition/IsNodeWithSymbol.js.map +1 -0
- package/dist/Processor/Condition/IsNodeWithSynSetId.d.ts +7 -0
- package/dist/Processor/Condition/IsNodeWithSynSetId.js +34 -0
- package/dist/Processor/Condition/IsNodeWithSynSetId.js.map +1 -0
- package/dist/Processor/Condition/IsNoneNode.d.ts +8 -0
- package/dist/Processor/Condition/IsNoneNode.js +29 -0
- package/dist/Processor/Condition/IsNoneNode.js.map +1 -0
- package/dist/Processor/Condition/IsNullElement.d.ts +5 -0
- package/dist/Processor/Condition/IsNullElement.js +27 -0
- package/dist/Processor/Condition/IsNullElement.js.map +1 -0
- package/dist/Processor/Condition/IsNumber.d.ts +5 -0
- package/dist/Processor/Condition/IsNumber.js +27 -0
- package/dist/Processor/Condition/IsNumber.js.map +1 -0
- package/dist/Processor/Condition/IsPredicateVerbNode.d.ts +7 -0
- package/dist/Processor/Condition/IsPredicateVerbNode.js +28 -0
- package/dist/Processor/Condition/IsPredicateVerbNode.js.map +1 -0
- package/dist/Processor/Condition/IsProperNoun.d.ts +5 -0
- package/dist/Processor/Condition/IsProperNoun.js +25 -0
- package/dist/Processor/Condition/IsProperNoun.js.map +1 -0
- package/dist/Processor/Condition/IsPunctuationNode.d.ts +5 -0
- package/dist/Processor/Condition/IsPunctuationNode.js +27 -0
- package/dist/Processor/Condition/IsPunctuationNode.js.map +1 -0
- package/dist/Processor/Condition/IsTransferable.d.ts +8 -0
- package/dist/Processor/Condition/IsTransferable.js +33 -0
- package/dist/Processor/Condition/IsTransferable.js.map +1 -0
- package/dist/Processor/Condition/IsTurkishLeafNode.d.ts +5 -0
- package/dist/Processor/Condition/IsTurkishLeafNode.js +27 -0
- package/dist/Processor/Condition/IsTurkishLeafNode.js.map +1 -0
- package/dist/Processor/Condition/IsVPNode.d.ts +5 -0
- package/dist/Processor/Condition/IsVPNode.js +20 -0
- package/dist/Processor/Condition/IsVPNode.js.map +1 -0
- package/dist/Processor/Condition/IsVerbNode.d.ts +8 -0
- package/dist/Processor/Condition/IsVerbNode.js +36 -0
- package/dist/Processor/Condition/IsVerbNode.js.map +1 -0
- package/dist/Processor/Condition/NodeDrawableCondition.d.ts +4 -0
- package/dist/Processor/Condition/NodeDrawableCondition.js +13 -0
- package/dist/Processor/Condition/NodeDrawableCondition.js.map +1 -0
- package/dist/Processor/LayerExist/ContainsLayerInformation.d.ts +8 -0
- package/dist/Processor/LayerExist/ContainsLayerInformation.js +45 -0
- package/dist/Processor/LayerExist/ContainsLayerInformation.js.map +1 -0
- package/dist/Processor/LayerExist/LeafListCondition.d.ts +4 -0
- package/dist/Processor/LayerExist/LeafListCondition.js +13 -0
- package/dist/Processor/LayerExist/LeafListCondition.js.map +1 -0
- package/dist/Processor/LayerExist/NotContainsLayerInformation.d.ts +8 -0
- package/dist/Processor/LayerExist/NotContainsLayerInformation.js +44 -0
- package/dist/Processor/LayerExist/NotContainsLayerInformation.js.map +1 -0
- package/dist/Processor/LayerExist/SemiContainsLayerInformation.d.ts +8 -0
- package/dist/Processor/LayerExist/SemiContainsLayerInformation.js +53 -0
- package/dist/Processor/LayerExist/SemiContainsLayerInformation.js.map +1 -0
- package/dist/Processor/LeafConverter/LeafToEnglish.d.ts +4 -0
- package/dist/Processor/LeafConverter/LeafToEnglish.js +23 -0
- package/dist/Processor/LeafConverter/LeafToEnglish.js.map +1 -0
- package/dist/Processor/LeafConverter/LeafToLanguageConverter.d.ts +7 -0
- package/dist/Processor/LeafConverter/LeafToLanguageConverter.js +44 -0
- package/dist/Processor/LeafConverter/LeafToLanguageConverter.js.map +1 -0
- package/dist/Processor/LeafConverter/LeafToPersian.d.ts +4 -0
- package/dist/Processor/LeafConverter/LeafToPersian.js +23 -0
- package/dist/Processor/LeafConverter/LeafToPersian.js.map +1 -0
- package/dist/Processor/LeafConverter/LeafToRootFormConverter.d.ts +5 -0
- package/dist/Processor/LeafConverter/LeafToRootFormConverter.js +28 -0
- package/dist/Processor/LeafConverter/LeafToRootFormConverter.js.map +1 -0
- package/dist/Processor/LeafConverter/LeafToStringConverter.d.ts +4 -0
- package/dist/Processor/LeafConverter/LeafToStringConverter.js +13 -0
- package/dist/Processor/LeafConverter/LeafToStringConverter.js.map +1 -0
- package/dist/Processor/LeafConverter/LeafToTurkish.d.ts +4 -0
- package/dist/Processor/LeafConverter/LeafToTurkish.js +23 -0
- package/dist/Processor/LeafConverter/LeafToTurkish.js.map +1 -0
- package/dist/Processor/NodeDrawableCollector.d.ts +9 -0
- package/dist/Processor/NodeDrawableCollector.js +34 -0
- package/dist/Processor/NodeDrawableCollector.js.map +1 -0
- package/dist/Processor/NodeModification/ConvertToLayeredFormat.d.ts +5 -0
- package/dist/Processor/NodeModification/ConvertToLayeredFormat.js +26 -0
- package/dist/Processor/NodeModification/ConvertToLayeredFormat.js.map +1 -0
- package/dist/Processor/NodeModification/NodeModifier.d.ts +4 -0
- package/dist/Processor/NodeModification/NodeModifier.js +13 -0
- package/dist/Processor/NodeModification/NodeModifier.js.map +1 -0
- package/dist/Processor/TreeModifier.d.ts +6 -0
- package/dist/Processor/TreeModifier.js +26 -0
- package/dist/Processor/TreeModifier.js.map +1 -0
- package/dist/Processor/TreeToStringConverter.d.ts +9 -0
- package/dist/Processor/TreeToStringConverter.js +36 -0
- package/dist/Processor/TreeToStringConverter.js.map +1 -0
- package/dist/TreeBankDrawable.d.ts +11 -0
- package/dist/TreeBankDrawable.js +52 -0
- package/dist/TreeBankDrawable.js.map +1 -0
- package/index.js +58 -0
- package/package.json +37 -0
- package/source/ChunkType.ts +3 -0
- package/source/Layer/DependencyLayer.ts +10 -0
- package/source/Layer/EnglishPropbankLayer.ts +22 -0
- package/source/Layer/EnglishSemanticLayer.ts +10 -0
- package/source/Layer/EnglishWordLayer.ts +9 -0
- package/source/Layer/MetaMorphemeLayer.ts +53 -0
- package/source/Layer/MetaMorphemesMovedLayer.ts +43 -0
- package/source/Layer/MorphologicalAnalysisLayer.ts +100 -0
- package/source/Layer/MultiWordLayer.ts +20 -0
- package/source/Layer/MultiWordMultiItemLayer.ts +9 -0
- package/source/Layer/NERLayer.ts +23 -0
- package/source/Layer/PersianWordLayer.ts +9 -0
- package/source/Layer/ShallowParseLayer.ts +22 -0
- package/source/Layer/SingleWordLayer.ts +9 -0
- package/source/Layer/SingleWordMultiItemLayer.ts +19 -0
- package/source/Layer/SourceLanguageWordLayer.ts +9 -0
- package/source/Layer/TargetLanguageWordLayer.ts +29 -0
- package/source/Layer/TurkishPropbankLayer.ts +26 -0
- package/source/Layer/TurkishSemanticLayer.ts +22 -0
- package/source/Layer/TurkishWordLayer.ts +9 -0
- package/source/Layer/WordLayer.ts +17 -0
- package/source/LayerInfo.ts +481 -0
- package/source/ParseNodeDrawable.ts +257 -0
- package/source/ParseTreeDrawable.ts +205 -0
- package/source/Processor/Condition/IsDoubleNode.ts +13 -0
- package/source/Processor/Condition/IsDoubleNodeWithDifferentTags.ts +13 -0
- package/source/Processor/Condition/IsEnglishLeafNode.ts +14 -0
- package/source/Processor/Condition/IsLeafNode.ts +10 -0
- package/source/Processor/Condition/IsNodeWithPredicate.ts +19 -0
- package/source/Processor/Condition/IsNodeWithSymbol.ts +20 -0
- package/source/Processor/Condition/IsNodeWithSynSetId.ts +26 -0
- package/source/Processor/Condition/IsNoneNode.ts +22 -0
- package/source/Processor/Condition/IsNullElement.ts +16 -0
- package/source/Processor/Condition/IsNumber.ts +16 -0
- package/source/Processor/Condition/IsPredicateVerbNode.ts +19 -0
- package/source/Processor/Condition/IsProperNoun.ts +14 -0
- package/source/Processor/Condition/IsPunctuationNode.ts +16 -0
- package/source/Processor/Condition/IsTransferable.ts +26 -0
- package/source/Processor/Condition/IsTurkishLeafNode.ts +16 -0
- package/source/Processor/Condition/IsVPNode.ts +10 -0
- package/source/Processor/Condition/IsVerbNode.ts +29 -0
- package/source/Processor/Condition/NodeDrawableCondition.ts +6 -0
- package/source/Processor/LayerExist/ContainsLayerInformation.ts +38 -0
- package/source/Processor/LayerExist/LeafListCondition.ts +6 -0
- package/source/Processor/LayerExist/NotContainsLayerInformation.ts +37 -0
- package/source/Processor/LayerExist/SemiContainsLayerInformation.ts +44 -0
- package/source/Processor/LeafConverter/LeafToEnglish.ts +11 -0
- package/source/Processor/LeafConverter/LeafToLanguageConverter.ts +35 -0
- package/source/Processor/LeafConverter/LeafToPersian.ts +10 -0
- package/source/Processor/LeafConverter/LeafToRootFormConverter.ts +18 -0
- package/source/Processor/LeafConverter/LeafToStringConverter.ts +6 -0
- package/source/Processor/LeafConverter/LeafToTurkish.ts +10 -0
- package/source/Processor/NodeDrawableCollector.ts +28 -0
- package/source/Processor/NodeModification/ConvertToLayeredFormat.ts +16 -0
- package/source/Processor/NodeModification/NodeModifier.ts +6 -0
- package/source/Processor/TreeModifier.ts +20 -0
- package/source/Processor/TreeToStringConverter.ts +31 -0
- package/source/TreeBankDrawable.ts +47 -0
- package/source/tsconfig.json +13 -0
- package/tests/ParseTreeDrawableTest.ts +161 -0
- package/trees/0000.dev +1 -0
- package/trees/0001.dev +1 -0
- package/trees/0002.dev +1 -0
- package/trees/0003.dev +1 -0
- package/trees/0004.dev +1 -0
- package/trees/0005.dev +1 -0
- package/trees/0006.dev +1 -0
- package/trees/0007.dev +1 -0
- package/trees/0008.dev +1 -0
- package/trees/0009.dev +1 -0
- package/trees2/0000.dev +1 -0
- package/trees2/0001.dev +1 -0
- package/trees2/0002.dev +1 -0
- package/trees2/0003.dev +1 -0
- package/trees2/0004.dev +1 -0
- package/trees2/0005.dev +1 -0
- package/trees2/0006.dev +1 -0
- package/trees2/0007.dev +1 -0
- package/trees2/0008.dev +1 -0
- package/trees2/0009.dev +1 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,20 @@
|
|
|
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.IsLeafNode = void 0;
|
|
13
|
+
class IsLeafNode {
|
|
14
|
+
satisfies(parseNode) {
|
|
15
|
+
return parseNode.numberOfChildren() == 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.IsLeafNode = IsLeafNode;
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=IsLeafNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsLeafNode.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsLeafNode.ts"],"names":[],"mappings":";;;;;;;;;;;;IAGA,MAAa,UAAU;QAEnB,SAAS,CAAC,SAA4B;YAClC,OAAO,SAAS,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;QAC7C,CAAC;KAEJ;IAND,gCAMC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IsNodeWithSynSetId } from "./IsNodeWithSynSetId";
|
|
2
|
+
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
3
|
+
export declare class IsNodeWithPredicate extends IsNodeWithSynSetId {
|
|
4
|
+
constructor(id: string);
|
|
5
|
+
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
6
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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", "./IsNodeWithSynSetId", "nlptoolkit-annotatedsentence/dist/ViewLayerType"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsNodeWithPredicate = void 0;
|
|
13
|
+
const IsNodeWithSynSetId_1 = require("./IsNodeWithSynSetId");
|
|
14
|
+
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
|
+
class IsNodeWithPredicate extends IsNodeWithSynSetId_1.IsNodeWithSynSetId {
|
|
16
|
+
constructor(id) {
|
|
17
|
+
super(id);
|
|
18
|
+
}
|
|
19
|
+
satisfies(parseNode) {
|
|
20
|
+
let layerInfo = parseNode.getLayerInfo();
|
|
21
|
+
return super.satisfies(parseNode)
|
|
22
|
+
&& layerInfo != null
|
|
23
|
+
&& layerInfo.getLayerData(ViewLayerType_1.ViewLayerType.PROPBANK) != null
|
|
24
|
+
&& layerInfo.getLayerData(ViewLayerType_1.ViewLayerType.PROPBANK) == "PREDICATE";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.IsNodeWithPredicate = IsNodeWithPredicate;
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=IsNodeWithPredicate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsNodeWithPredicate.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsNodeWithPredicate.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6DAAwD;IAExD,mFAA8E;IAE9E,MAAa,mBAAoB,SAAQ,uCAAkB;QAEvD,YAAY,EAAU;YAClB,KAAK,CAAC,EAAE,CAAC,CAAC;QACd,CAAC;QAED,SAAS,CAAC,SAA4B;YAClC,IAAI,SAAS,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC;YACzC,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;mBAC1B,SAAS,IAAI,IAAI;mBACjB,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,QAAQ,CAAC,IAAI,IAAI;mBACtD,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC;QACzE,CAAC;KAEJ;IAdD,kDAcC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NodeDrawableCondition } from "./NodeDrawableCondition";
|
|
2
|
+
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
3
|
+
export declare class IsNodeWithSymbol implements NodeDrawableCondition {
|
|
4
|
+
private symbol;
|
|
5
|
+
constructor(symbol: string);
|
|
6
|
+
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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.IsNodeWithSymbol = void 0;
|
|
13
|
+
class IsNodeWithSymbol {
|
|
14
|
+
constructor(symbol) {
|
|
15
|
+
this.symbol = symbol;
|
|
16
|
+
}
|
|
17
|
+
satisfies(parseNode) {
|
|
18
|
+
if (parseNode.numberOfChildren() > 0) {
|
|
19
|
+
return parseNode.getData().toString() == this.symbol;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.IsNodeWithSymbol = IsNodeWithSymbol;
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=IsNodeWithSymbol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsNodeWithSymbol.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsNodeWithSymbol.ts"],"names":[],"mappings":";;;;;;;;;;;;IAGA,MAAa,gBAAgB;QAIzB,YAAY,MAAc;YACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACxB,CAAC;QAED,SAAS,CAAC,SAA4B;YAClC,IAAI,SAAS,CAAC,gBAAgB,EAAE,GAAG,CAAC,EAAC;gBACjC,OAAO,SAAS,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC;aACxD;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC;KAEJ;IAhBD,4CAgBC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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", "./IsLeafNode"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsNodeWithSynSetId = void 0;
|
|
13
|
+
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
|
+
class IsNodeWithSynSetId extends IsLeafNode_1.IsLeafNode {
|
|
15
|
+
constructor(id) {
|
|
16
|
+
super();
|
|
17
|
+
this.id = id;
|
|
18
|
+
}
|
|
19
|
+
satisfies(parseNode) {
|
|
20
|
+
if (super.satisfies(parseNode)) {
|
|
21
|
+
let layerInfo = parseNode.getLayerInfo();
|
|
22
|
+
for (let i = 0; i < layerInfo.getNumberOfMeanings(); i++) {
|
|
23
|
+
let synSetId = layerInfo.getSemanticAt(i);
|
|
24
|
+
if (synSetId == this.id) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.IsNodeWithSynSetId = IsNodeWithSynSetId;
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=IsNodeWithSynSetId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsNodeWithSynSetId.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsNodeWithSynSetId.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAGxC,MAAa,kBAAmB,SAAQ,uBAAU;QAI9C,YAAY,EAAU;YAClB,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QAChB,CAAC;QAED,SAAS,CAAC,SAA4B;YAClC,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gBAC3B,IAAI,SAAS,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC;gBACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAE;oBACtD,IAAI,QAAQ,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;oBAC1C,IAAI,QAAQ,IAAI,IAAI,CAAC,EAAE,EAAC;wBACpB,OAAO,IAAI,CAAC;qBACf;iBACJ;aACJ;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAEJ;IAtBD,gDAsBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IsLeafNode } from "./IsLeafNode";
|
|
2
|
+
import { ViewLayerType } from "nlptoolkit-annotatedsentence/dist/ViewLayerType";
|
|
3
|
+
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
4
|
+
export declare class IsNoneNode extends IsLeafNode {
|
|
5
|
+
private secondLanguage;
|
|
6
|
+
constructor(secondLanguage: ViewLayerType);
|
|
7
|
+
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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", "./IsLeafNode"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsNoneNode = void 0;
|
|
13
|
+
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
|
+
class IsNoneNode extends IsLeafNode_1.IsLeafNode {
|
|
15
|
+
constructor(secondLanguage) {
|
|
16
|
+
super();
|
|
17
|
+
this.secondLanguage = secondLanguage;
|
|
18
|
+
}
|
|
19
|
+
satisfies(parseNode) {
|
|
20
|
+
if (super.satisfies(parseNode)) {
|
|
21
|
+
let data = parseNode.getLayerData(this.secondLanguage);
|
|
22
|
+
return data != null && data == "*NONE*";
|
|
23
|
+
}
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.IsNoneNode = IsNoneNode;
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=IsNoneNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsNoneNode.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsNoneNode.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAIxC,MAAa,UAAW,SAAQ,uBAAU;QAItC,YAAY,cAA6B;YACrC,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACxC,CAAC;QAED,SAAS,CAAC,SAA4B;YAClC,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gBAC3B,IAAI,IAAI,GAAG,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;gBACvD,OAAO,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,QAAQ,CAAC;aAC3C;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAEJ;IAjBD,gCAiBC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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", "./IsLeafNode", "nlptoolkit-annotatedsentence/dist/ViewLayerType"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsNullElement = void 0;
|
|
13
|
+
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
|
+
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
|
+
class IsNullElement extends IsLeafNode_1.IsLeafNode {
|
|
16
|
+
satisfies(parseNode) {
|
|
17
|
+
if (super.satisfies(parseNode)) {
|
|
18
|
+
let data = parseNode.getLayerData(ViewLayerType_1.ViewLayerType.ENGLISH_WORD);
|
|
19
|
+
let parentData = parseNode.getParent().getData().getName();
|
|
20
|
+
return data.includes("*") || (data == "0" && parentData == "-NONE-");
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.IsNullElement = IsNullElement;
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=IsNullElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsNullElement.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsNullElement.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,mFAA8E;IAE9E,MAAa,aAAc,SAAQ,uBAAU;QAEzC,SAAS,CAAC,SAA4B;YAClC,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gBAC3B,IAAI,IAAI,GAAG,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC;gBAC9D,IAAI,UAAU,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;gBAC3D,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,IAAI,UAAU,IAAI,QAAQ,CAAC,CAAC;aACxE;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAEJ;IAXD,sCAWC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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", "./IsLeafNode", "nlptoolkit-annotatedsentence/dist/ViewLayerType"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsNumber = void 0;
|
|
13
|
+
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
|
+
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
|
+
class IsNumber extends IsLeafNode_1.IsLeafNode {
|
|
16
|
+
satisfies(parseNode) {
|
|
17
|
+
if (super.satisfies(parseNode)) {
|
|
18
|
+
let data = parseNode.getLayerData(ViewLayerType_1.ViewLayerType.ENGLISH_WORD);
|
|
19
|
+
let parentData = parseNode.getParent().getData().getName();
|
|
20
|
+
return parentData == "CD" && !Number.isNaN(data);
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.IsNumber = IsNumber;
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=IsNumber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsNumber.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsNumber.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,mFAA8E;IAE9E,MAAa,QAAS,SAAQ,uBAAU;QAEpC,SAAS,CAAC,SAA4B;YAClC,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gBAC3B,IAAI,IAAI,GAAG,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC;gBAC9D,IAAI,UAAU,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;gBAC3D,OAAO,UAAU,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aACpD;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAEJ;IAXD,4BAWC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IsVerbNode } from "./IsVerbNode";
|
|
2
|
+
import { WordNet } from "nlptoolkit-wordnet/dist/WordNet";
|
|
3
|
+
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
4
|
+
export declare class IsPredicateVerbNode extends IsVerbNode {
|
|
5
|
+
constructor(wordNet: WordNet);
|
|
6
|
+
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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", "./IsVerbNode"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsPredicateVerbNode = void 0;
|
|
13
|
+
const IsVerbNode_1 = require("./IsVerbNode");
|
|
14
|
+
class IsPredicateVerbNode extends IsVerbNode_1.IsVerbNode {
|
|
15
|
+
constructor(wordNet) {
|
|
16
|
+
super(wordNet);
|
|
17
|
+
}
|
|
18
|
+
satisfies(parseNode) {
|
|
19
|
+
let layerInfo = parseNode.getLayerInfo();
|
|
20
|
+
return super.satisfies(parseNode)
|
|
21
|
+
&& layerInfo != null
|
|
22
|
+
&& layerInfo.getArgument() != null
|
|
23
|
+
&& layerInfo.getArgument().getArgumentType() == "PREDICATE";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.IsPredicateVerbNode = IsPredicateVerbNode;
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=IsPredicateVerbNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsPredicateVerbNode.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsPredicateVerbNode.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAIxC,MAAa,mBAAoB,SAAQ,uBAAU;QAE/C,YAAY,OAAgB;YACxB,KAAK,CAAC,OAAO,CAAC,CAAC;QACnB,CAAC;QAED,SAAS,CAAC,SAA4B;YAClC,IAAI,SAAS,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC;YACzC,OAAO,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;mBAC1B,SAAS,IAAI,IAAI;mBACjB,SAAS,CAAC,WAAW,EAAE,IAAI,IAAI;mBAC/B,SAAS,CAAC,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,WAAW,CAAC;QACpE,CAAC;KAEJ;IAdD,kDAcC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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", "./IsLeafNode"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsProperNoun = void 0;
|
|
13
|
+
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
|
+
class IsProperNoun extends IsLeafNode_1.IsLeafNode {
|
|
15
|
+
satisfies(parseNode) {
|
|
16
|
+
if (super.satisfies(parseNode)) {
|
|
17
|
+
let parentData = parseNode.getParent().getData().getName();
|
|
18
|
+
return parentData == "NNP" || parentData == "NNPS";
|
|
19
|
+
}
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.IsProperNoun = IsProperNoun;
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=IsProperNoun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsProperNoun.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsProperNoun.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAGxC,MAAa,YAAa,SAAQ,uBAAU;QAExC,SAAS,CAAC,SAA4B;YAClC,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gBAC3B,IAAI,UAAU,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;gBAC3D,OAAO,UAAU,IAAI,KAAK,IAAI,UAAU,IAAI,MAAM,CAAC;aACtD;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAEJ;IAVD,oCAUC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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", "./IsLeafNode", "nlptoolkit-annotatedsentence/dist/ViewLayerType", "nlptoolkit-dictionary/dist/Dictionary/Word"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsPunctuationNode = void 0;
|
|
13
|
+
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
|
+
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
|
+
const Word_1 = require("nlptoolkit-dictionary/dist/Dictionary/Word");
|
|
16
|
+
class IsPunctuationNode extends IsLeafNode_1.IsLeafNode {
|
|
17
|
+
satisfies(parseNode) {
|
|
18
|
+
if (super.satisfies(parseNode)) {
|
|
19
|
+
let data = parseNode.getLayerData(ViewLayerType_1.ViewLayerType.ENGLISH_WORD);
|
|
20
|
+
return Word_1.Word.isPunctuation(data) && data != "$";
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.IsPunctuationNode = IsPunctuationNode;
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=IsPunctuationNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsPunctuationNode.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsPunctuationNode.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,mFAA8E;IAC9E,qEAAgE;IAEhE,MAAa,iBAAkB,SAAQ,uBAAU;QAE7C,SAAS,CAAC,SAA4B;YAClC,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gBAC3B,IAAI,IAAI,GAAG,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC;gBAC9D,OAAO,WAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC;aAClD;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAEJ;IAVD,8CAUC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IsLeafNode } from "./IsLeafNode";
|
|
2
|
+
import { ViewLayerType } from "nlptoolkit-annotatedsentence/dist/ViewLayerType";
|
|
3
|
+
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
4
|
+
export declare class IsTransferable extends IsLeafNode {
|
|
5
|
+
private secondLanguage;
|
|
6
|
+
constructor(secondLanguage: ViewLayerType);
|
|
7
|
+
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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", "./IsLeafNode", "./IsNoneNode", "./IsNullElement"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsTransferable = void 0;
|
|
13
|
+
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
|
+
const IsNoneNode_1 = require("./IsNoneNode");
|
|
15
|
+
const IsNullElement_1 = require("./IsNullElement");
|
|
16
|
+
class IsTransferable extends IsLeafNode_1.IsLeafNode {
|
|
17
|
+
constructor(secondLanguage) {
|
|
18
|
+
super();
|
|
19
|
+
this.secondLanguage = secondLanguage;
|
|
20
|
+
}
|
|
21
|
+
satisfies(parseNode) {
|
|
22
|
+
if (super.satisfies(parseNode)) {
|
|
23
|
+
if (new IsNoneNode_1.IsNoneNode(this.secondLanguage).satisfies(parseNode)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return !new IsNullElement_1.IsNullElement().satisfies(parseNode);
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.IsTransferable = IsTransferable;
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=IsTransferable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsTransferable.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsTransferable.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAGxC,6CAAwC;IACxC,mDAA8C;IAE9C,MAAa,cAAe,SAAQ,uBAAU;QAI1C,YAAY,cAA6B;YACrC,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACxC,CAAC;QAED,SAAS,CAAC,SAA4B;YAClC,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE;gBAC5B,IAAI,IAAI,uBAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;oBACzD,OAAO,KAAK,CAAC;iBAChB;gBACD,OAAO,CAAC,IAAI,6BAAa,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;aACpD;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAEJ;IAnBD,wCAmBC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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", "./IsLeafNode", "nlptoolkit-annotatedsentence/dist/ViewLayerType"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsTurkishLeafNode = void 0;
|
|
13
|
+
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
|
+
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
|
+
class IsTurkishLeafNode extends IsLeafNode_1.IsLeafNode {
|
|
16
|
+
satisfies(parseNode) {
|
|
17
|
+
if (super.satisfies(parseNode)) {
|
|
18
|
+
let data = parseNode.getLayerInfo().getLayerData(ViewLayerType_1.ViewLayerType.TURKISH_WORD);
|
|
19
|
+
let parentData = parseNode.getParent().getData().getName();
|
|
20
|
+
return data != null && !data.includes("*") && !(data == "0" && parentData == "-NONE-");
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.IsTurkishLeafNode = IsTurkishLeafNode;
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=IsTurkishLeafNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsTurkishLeafNode.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsTurkishLeafNode.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,mFAA8E;IAE9E,MAAa,iBAAkB,SAAQ,uBAAU;QAE7C,SAAS,CAAC,SAA4B;YAClC,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gBAC3B,IAAI,IAAI,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC;gBAC7E,IAAI,UAAU,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;gBAC3D,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,GAAG,IAAI,UAAU,IAAI,QAAQ,CAAC,CAAC;aAC1F;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAEJ;IAXD,8CAWC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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.IsVPNode = void 0;
|
|
13
|
+
class IsVPNode {
|
|
14
|
+
satisfies(parseNode) {
|
|
15
|
+
return parseNode.numberOfChildren() > 0 && parseNode.getData().isVP();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.IsVPNode = IsVPNode;
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=IsVPNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsVPNode.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsVPNode.ts"],"names":[],"mappings":";;;;;;;;;;;;IAGA,MAAa,QAAQ;QAEjB,SAAS,CAAC,SAA4B;YAClC,OAAO,SAAS,CAAC,gBAAgB,EAAE,GAAG,CAAC,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;QAC1E,CAAC;KAEJ;IAND,4BAMC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IsLeafNode } from "./IsLeafNode";
|
|
2
|
+
import { WordNet } from "nlptoolkit-wordnet/dist/WordNet";
|
|
3
|
+
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
4
|
+
export declare class IsVerbNode extends IsLeafNode {
|
|
5
|
+
private wordNet;
|
|
6
|
+
constructor(wordNet: WordNet);
|
|
7
|
+
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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", "./IsLeafNode", "nlptoolkit-annotatedsentence/dist/ViewLayerType", "nlptoolkit-dictionary/dist/Dictionary/Pos"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IsVerbNode = void 0;
|
|
13
|
+
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
|
+
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
|
+
const Pos_1 = require("nlptoolkit-dictionary/dist/Dictionary/Pos");
|
|
16
|
+
class IsVerbNode extends IsLeafNode_1.IsLeafNode {
|
|
17
|
+
constructor(wordNet) {
|
|
18
|
+
super();
|
|
19
|
+
this.wordNet = wordNet;
|
|
20
|
+
}
|
|
21
|
+
satisfies(parseNode) {
|
|
22
|
+
let layerInfo = parseNode.getLayerInfo();
|
|
23
|
+
if (super.satisfies(parseNode) && layerInfo != null && layerInfo.getLayerData(ViewLayerType_1.ViewLayerType.SEMANTICS) != null) {
|
|
24
|
+
for (let i = 0; i < layerInfo.getNumberOfMeanings(); i++) {
|
|
25
|
+
let synSetId = layerInfo.getSemanticAt(i);
|
|
26
|
+
if (this.wordNet.getSynSetWithId(synSetId) != null && this.wordNet.getSynSetWithId(synSetId).getPos() == Pos_1.Pos.VERB) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.IsVerbNode = IsVerbNode;
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=IsVerbNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsVerbNode.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsVerbNode.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAGxC,mFAA8E;IAC9E,mEAA8D;IAE9D,MAAa,UAAW,SAAQ,uBAAU;QAItC,YAAY,OAAgB;YACxB,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAC1B,CAAC;QAED,SAAS,CAAC,SAA4B;YAClC,IAAI,SAAS,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC;YACzC,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,SAAS,CAAC,IAAI,IAAI,EAAC;gBAC3G,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAC;oBACrD,IAAI,QAAQ,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;oBAC1C,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,IAAI,SAAG,CAAC,IAAI,EAAC;wBAC9G,OAAO,IAAI,CAAC;qBACf;iBACJ;aACJ;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;KAEJ;IAtBD,gCAsBC"}
|
|
@@ -0,0 +1,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"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=NodeDrawableCondition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeDrawableCondition.js","sourceRoot":"","sources":["../../../source/Processor/Condition/NodeDrawableCondition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LeafListCondition } from "./LeafListCondition";
|
|
2
|
+
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
3
|
+
import { ViewLayerType } from "nlptoolkit-annotatedsentence/dist/ViewLayerType";
|
|
4
|
+
export declare class ContainsLayerInformation implements LeafListCondition {
|
|
5
|
+
private readonly viewLayerType;
|
|
6
|
+
constructor(viewLayerType: ViewLayerType);
|
|
7
|
+
satisfies(leafList: Array<ParseNodeDrawable>): boolean;
|
|
8
|
+
}
|