nlptoolkit-annotatedtree 1.0.2 → 1.0.4
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 +6 -1
- package/dist/Layer/DependencyLayer.d.ts +4 -0
- package/dist/Layer/DependencyLayer.js +4 -0
- package/dist/Layer/DependencyLayer.js.map +1 -1
- package/dist/Layer/EnglishPropbankLayer.d.ts +9 -0
- package/dist/Layer/EnglishPropbankLayer.js +9 -0
- package/dist/Layer/EnglishPropbankLayer.js.map +1 -1
- package/dist/Layer/EnglishSemanticLayer.d.ts +5 -0
- package/dist/Layer/EnglishSemanticLayer.js +5 -0
- package/dist/Layer/EnglishSemanticLayer.js.map +1 -1
- package/dist/Layer/EnglishWordLayer.d.ts +4 -0
- package/dist/Layer/EnglishWordLayer.js +4 -0
- package/dist/Layer/EnglishWordLayer.js.map +1 -1
- package/dist/Layer/MetaMorphemeLayer.d.ts +19 -0
- package/dist/Layer/MetaMorphemeLayer.js +19 -0
- package/dist/Layer/MetaMorphemeLayer.js.map +1 -1
- package/dist/Layer/MetaMorphemesMovedLayer.d.ts +20 -0
- package/dist/Layer/MetaMorphemesMovedLayer.js +20 -0
- package/dist/Layer/MetaMorphemesMovedLayer.js.map +1 -1
- package/dist/Layer/MorphologicalAnalysisLayer.d.ts +32 -0
- package/dist/Layer/MorphologicalAnalysisLayer.js +32 -0
- package/dist/Layer/MorphologicalAnalysisLayer.js.map +1 -1
- package/dist/Layer/MultiWordLayer.d.ts +9 -0
- package/dist/Layer/MultiWordLayer.js +9 -0
- package/dist/Layer/MultiWordLayer.js.map +1 -1
- package/dist/Layer/NERLayer.d.ts +14 -0
- package/dist/Layer/NERLayer.js +14 -0
- package/dist/Layer/NERLayer.js.map +1 -1
- package/dist/Layer/PersianWordLayer.d.ts +4 -0
- package/dist/Layer/PersianWordLayer.js +4 -0
- package/dist/Layer/PersianWordLayer.js.map +1 -1
- package/dist/Layer/ShallowParseLayer.d.ts +11 -0
- package/dist/Layer/ShallowParseLayer.js +11 -0
- package/dist/Layer/ShallowParseLayer.js.map +1 -1
- package/dist/Layer/SingleWordLayer.d.ts +4 -0
- package/dist/Layer/SingleWordLayer.js +4 -0
- package/dist/Layer/SingleWordLayer.js.map +1 -1
- package/dist/Layer/SourceLanguageWordLayer.d.ts +4 -0
- package/dist/Layer/SourceLanguageWordLayer.js +4 -0
- package/dist/Layer/SourceLanguageWordLayer.js.map +1 -1
- package/dist/Layer/TargetLanguageWordLayer.d.ts +10 -1
- package/dist/Layer/TargetLanguageWordLayer.js +9 -0
- package/dist/Layer/TargetLanguageWordLayer.js.map +1 -1
- package/dist/Layer/TurkishPropbankLayer.d.ts +18 -0
- package/dist/Layer/TurkishPropbankLayer.js +18 -0
- package/dist/Layer/TurkishPropbankLayer.js.map +1 -1
- package/dist/Layer/TurkishSemanticLayer.d.ts +11 -0
- package/dist/Layer/TurkishSemanticLayer.js +11 -0
- package/dist/Layer/TurkishSemanticLayer.js.map +1 -1
- package/dist/Layer/TurkishWordLayer.d.ts +4 -0
- package/dist/Layer/TurkishWordLayer.js +4 -0
- package/dist/Layer/TurkishWordLayer.js.map +1 -1
- package/dist/Layer/WordLayer.d.ts +12 -0
- package/dist/Layer/WordLayer.js +12 -0
- package/dist/Layer/WordLayer.js.map +1 -1
- package/dist/LayerInfo.d.ts +188 -0
- package/dist/LayerInfo.js +229 -63
- package/dist/LayerInfo.js.map +1 -1
- package/dist/ParseNodeDrawable.d.ts +102 -0
- package/dist/ParseNodeDrawable.js +102 -0
- package/dist/ParseNodeDrawable.js.map +1 -1
- package/dist/ParseTreeDrawable.d.ts +134 -0
- package/dist/ParseTreeDrawable.js +153 -16
- package/dist/ParseTreeDrawable.js.map +1 -1
- package/dist/Processor/Condition/IsDoubleNode.d.ts +6 -0
- package/dist/Processor/Condition/IsDoubleNode.js +6 -0
- package/dist/Processor/Condition/IsDoubleNode.js.map +1 -1
- package/dist/Processor/Condition/IsDoubleNodeWithDifferentTags.d.ts +6 -0
- package/dist/Processor/Condition/IsDoubleNodeWithDifferentTags.js +6 -0
- package/dist/Processor/Condition/IsDoubleNodeWithDifferentTags.js.map +1 -1
- package/dist/Processor/Condition/IsEnglishLeafNode.d.ts +5 -0
- package/dist/Processor/Condition/IsEnglishLeafNode.js +5 -0
- package/dist/Processor/Condition/IsEnglishLeafNode.js.map +1 -1
- package/dist/Processor/Condition/IsLeafNode.d.ts +5 -0
- package/dist/Processor/Condition/IsLeafNode.js +5 -0
- package/dist/Processor/Condition/IsLeafNode.js.map +1 -1
- package/dist/Processor/Condition/IsNodeWithPredicate.d.ts +11 -0
- package/dist/Processor/Condition/IsNodeWithPredicate.js +11 -0
- package/dist/Processor/Condition/IsNodeWithPredicate.js.map +1 -1
- package/dist/Processor/Condition/IsNodeWithSymbol.d.ts +9 -0
- package/dist/Processor/Condition/IsNodeWithSymbol.js +9 -0
- package/dist/Processor/Condition/IsNodeWithSymbol.js.map +1 -1
- package/dist/Processor/Condition/IsNodeWithSynSetId.d.ts +9 -0
- package/dist/Processor/Condition/IsNodeWithSynSetId.js +9 -0
- package/dist/Processor/Condition/IsNodeWithSynSetId.js.map +1 -1
- package/dist/Processor/Condition/IsNoneNode.d.ts +5 -0
- package/dist/Processor/Condition/IsNoneNode.js +5 -0
- package/dist/Processor/Condition/IsNoneNode.js.map +1 -1
- package/dist/Processor/Condition/IsNullElement.d.ts +6 -0
- package/dist/Processor/Condition/IsNullElement.js +6 -0
- package/dist/Processor/Condition/IsNullElement.js.map +1 -1
- package/dist/Processor/Condition/IsNumber.d.ts +6 -0
- package/dist/Processor/Condition/IsNumber.js +6 -0
- package/dist/Processor/Condition/IsNumber.js.map +1 -1
- package/dist/Processor/Condition/IsPredicateVerbNode.d.ts +11 -0
- package/dist/Processor/Condition/IsPredicateVerbNode.js +11 -0
- package/dist/Processor/Condition/IsPredicateVerbNode.js.map +1 -1
- package/dist/Processor/Condition/IsProperNoun.d.ts +5 -0
- package/dist/Processor/Condition/IsProperNoun.js +5 -0
- package/dist/Processor/Condition/IsProperNoun.js.map +1 -1
- package/dist/Processor/Condition/IsPunctuationNode.d.ts +5 -0
- package/dist/Processor/Condition/IsPunctuationNode.js +5 -0
- package/dist/Processor/Condition/IsPunctuationNode.js.map +1 -1
- package/dist/Processor/Condition/IsTransferable.d.ts +5 -0
- package/dist/Processor/Condition/IsTransferable.js +5 -0
- package/dist/Processor/Condition/IsTransferable.js.map +1 -1
- package/dist/Processor/Condition/IsTurkishLeafNode.d.ts +5 -0
- package/dist/Processor/Condition/IsTurkishLeafNode.js +5 -0
- package/dist/Processor/Condition/IsTurkishLeafNode.js.map +1 -1
- package/dist/Processor/Condition/IsVPNode.d.ts +5 -0
- package/dist/Processor/Condition/IsVPNode.js +5 -0
- package/dist/Processor/Condition/IsVPNode.js.map +1 -1
- package/dist/Processor/Condition/IsVerbNode.d.ts +10 -0
- package/dist/Processor/Condition/IsVerbNode.js +10 -0
- package/dist/Processor/Condition/IsVerbNode.js.map +1 -1
- package/dist/Processor/LayerExist/ContainsLayerInformation.d.ts +9 -0
- package/dist/Processor/LayerExist/ContainsLayerInformation.js +9 -0
- package/dist/Processor/LayerExist/ContainsLayerInformation.js.map +1 -1
- package/dist/Processor/LayerExist/NotContainsLayerInformation.d.ts +9 -0
- package/dist/Processor/LayerExist/NotContainsLayerInformation.js +9 -0
- package/dist/Processor/LayerExist/NotContainsLayerInformation.js.map +1 -1
- package/dist/Processor/LayerExist/SemiContainsLayerInformation.d.ts +10 -0
- package/dist/Processor/LayerExist/SemiContainsLayerInformation.js +10 -0
- package/dist/Processor/LayerExist/SemiContainsLayerInformation.js.map +1 -1
- package/dist/Processor/LeafConverter/LeafToEnglish.d.ts +3 -0
- package/dist/Processor/LeafConverter/LeafToEnglish.js +3 -0
- package/dist/Processor/LeafConverter/LeafToEnglish.js.map +1 -1
- package/dist/Processor/LeafConverter/LeafToLanguageConverter.d.ts +7 -0
- package/dist/Processor/LeafConverter/LeafToLanguageConverter.js +7 -0
- package/dist/Processor/LeafConverter/LeafToLanguageConverter.js.map +1 -1
- package/dist/Processor/LeafConverter/LeafToPersian.d.ts +3 -0
- package/dist/Processor/LeafConverter/LeafToPersian.js +3 -0
- package/dist/Processor/LeafConverter/LeafToPersian.js.map +1 -1
- package/dist/Processor/LeafConverter/LeafToRootFormConverter.d.ts +7 -0
- package/dist/Processor/LeafConverter/LeafToRootFormConverter.js +7 -0
- package/dist/Processor/LeafConverter/LeafToRootFormConverter.js.map +1 -1
- package/dist/Processor/LeafConverter/LeafToTurkish.d.ts +3 -0
- package/dist/Processor/LeafConverter/LeafToTurkish.js +3 -0
- package/dist/Processor/LeafConverter/LeafToTurkish.js.map +1 -1
- package/dist/Processor/NodeDrawableCollector.d.ts +16 -0
- package/dist/Processor/NodeDrawableCollector.js +16 -0
- package/dist/Processor/NodeDrawableCollector.js.map +1 -1
- package/dist/Processor/TreeToStringConverter.d.ts +15 -0
- package/dist/Processor/TreeToStringConverter.js +15 -0
- package/dist/Processor/TreeToStringConverter.js.map +1 -1
- package/dist/TreeBankDrawable.d.ts +20 -0
- package/dist/TreeBankDrawable.js +20 -0
- package/dist/TreeBankDrawable.js.map +1 -1
- package/package.json +14 -12
- package/source/Layer/DependencyLayer.ts +4 -0
- package/source/Layer/EnglishPropbankLayer.ts +9 -0
- package/source/Layer/EnglishSemanticLayer.ts +5 -0
- package/source/Layer/EnglishWordLayer.ts +4 -0
- package/source/Layer/MetaMorphemeLayer.ts +19 -0
- package/source/Layer/MetaMorphemesMovedLayer.ts +20 -0
- package/source/Layer/MorphologicalAnalysisLayer.ts +32 -0
- package/source/Layer/MultiWordLayer.ts +9 -0
- package/source/Layer/NERLayer.ts +14 -0
- package/source/Layer/PersianWordLayer.ts +4 -0
- package/source/Layer/ShallowParseLayer.ts +11 -0
- package/source/Layer/SingleWordLayer.ts +4 -0
- package/source/Layer/SourceLanguageWordLayer.ts +4 -0
- package/source/Layer/TargetLanguageWordLayer.ts +10 -1
- package/source/Layer/TurkishPropbankLayer.ts +18 -0
- package/source/Layer/TurkishSemanticLayer.ts +11 -0
- package/source/Layer/TurkishWordLayer.ts +4 -0
- package/source/Layer/WordLayer.ts +12 -0
- package/source/LayerInfo.ts +333 -155
- package/source/ParseNodeDrawable.ts +102 -0
- package/source/ParseTreeDrawable.ts +158 -16
- package/source/Processor/Condition/IsDoubleNode.ts +6 -0
- package/source/Processor/Condition/IsDoubleNodeWithDifferentTags.ts +6 -0
- package/source/Processor/Condition/IsEnglishLeafNode.ts +5 -0
- package/source/Processor/Condition/IsLeafNode.ts +5 -0
- package/source/Processor/Condition/IsNodeWithPredicate.ts +11 -0
- package/source/Processor/Condition/IsNodeWithSymbol.ts +9 -0
- package/source/Processor/Condition/IsNodeWithSynSetId.ts +9 -0
- package/source/Processor/Condition/IsNoneNode.ts +5 -0
- package/source/Processor/Condition/IsNullElement.ts +6 -0
- package/source/Processor/Condition/IsNumber.ts +6 -0
- package/source/Processor/Condition/IsPredicateVerbNode.ts +11 -0
- package/source/Processor/Condition/IsProperNoun.ts +5 -0
- package/source/Processor/Condition/IsPunctuationNode.ts +5 -0
- package/source/Processor/Condition/IsTransferable.ts +5 -0
- package/source/Processor/Condition/IsTurkishLeafNode.ts +5 -0
- package/source/Processor/Condition/IsVPNode.ts +5 -0
- package/source/Processor/Condition/IsVerbNode.ts +10 -0
- package/source/Processor/LayerExist/ContainsLayerInformation.ts +9 -0
- package/source/Processor/LayerExist/NotContainsLayerInformation.ts +9 -0
- package/source/Processor/LayerExist/SemiContainsLayerInformation.ts +10 -0
- package/source/Processor/LeafConverter/LeafToEnglish.ts +3 -0
- package/source/Processor/LeafConverter/LeafToLanguageConverter.ts +7 -0
- package/source/Processor/LeafConverter/LeafToPersian.ts +3 -0
- package/source/Processor/LeafConverter/LeafToRootFormConverter.ts +7 -0
- package/source/Processor/LeafConverter/LeafToTurkish.ts +3 -0
- package/source/Processor/NodeDrawableCollector.ts +16 -0
- package/source/Processor/TreeToStringConverter.ts +15 -0
- package/source/TreeBankDrawable.ts +20 -0
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
14
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
15
|
class IsNullElement extends IsLeafNode_1.IsLeafNode {
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the parse node is a leaf node and its data is '*' and its parent's data is '-NONE-'.
|
|
18
|
+
* @param parseNode Parse node to check.
|
|
19
|
+
* @return True if the parse node is a leaf node and its data is '*' and its parent's data is '-NONE-', false
|
|
20
|
+
* otherwise.
|
|
21
|
+
*/
|
|
16
22
|
satisfies(parseNode) {
|
|
17
23
|
if (super.satisfies(parseNode)) {
|
|
18
24
|
let data = parseNode.getLayerData(ViewLayerType_1.ViewLayerType.ENGLISH_WORD);
|
|
@@ -1 +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;
|
|
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;;;;;WAKG;QACH,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;IAjBD,sCAiBC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { IsLeafNode } from "./IsLeafNode";
|
|
2
2
|
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
3
3
|
export declare class IsNumber extends IsLeafNode {
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the node is a leaf node and contains numerals as the data and its parent has the tag CD.
|
|
6
|
+
* @param parseNode Parse node to check.
|
|
7
|
+
* @return True if the node is a leaf node and contains numerals as the data and its parent has the tag CD, false
|
|
8
|
+
* otherwise.
|
|
9
|
+
*/
|
|
4
10
|
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
5
11
|
}
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
14
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
15
|
class IsNumber extends IsLeafNode_1.IsLeafNode {
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the node is a leaf node and contains numerals as the data and its parent has the tag CD.
|
|
18
|
+
* @param parseNode Parse node to check.
|
|
19
|
+
* @return True if the node is a leaf node and contains numerals as the data and its parent has the tag CD, false
|
|
20
|
+
* otherwise.
|
|
21
|
+
*/
|
|
16
22
|
satisfies(parseNode) {
|
|
17
23
|
if (super.satisfies(parseNode)) {
|
|
18
24
|
let data = parseNode.getLayerData(ViewLayerType_1.ViewLayerType.ENGLISH_WORD);
|
|
@@ -1 +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;
|
|
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;;;;;WAKG;QACH,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;IAjBD,4BAiBC"}
|
|
@@ -2,6 +2,17 @@ import { IsVerbNode } from "./IsVerbNode";
|
|
|
2
2
|
import { WordNet } from "nlptoolkit-wordnet/dist/WordNet";
|
|
3
3
|
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
4
4
|
export declare class IsPredicateVerbNode extends IsVerbNode {
|
|
5
|
+
/**
|
|
6
|
+
* Stores the wordnet for checking the pos tag of the synset.
|
|
7
|
+
* @param wordNet Wordnet used for checking the pos tag of the synset.
|
|
8
|
+
*/
|
|
5
9
|
constructor(wordNet: WordNet);
|
|
10
|
+
/**
|
|
11
|
+
* Checks if the node is a leaf node and at least one of the semantic ids of the parse node belong to a verb synset,
|
|
12
|
+
* and the semantic role of the node is PREDICATE.
|
|
13
|
+
* @param parseNode Parse node to check.
|
|
14
|
+
* @return True if the node is a leaf node and at least one of the semantic ids of the parse node belong to a verb
|
|
15
|
+
* synset and the semantic role of the node is PREDICATE, false otherwise.
|
|
16
|
+
*/
|
|
6
17
|
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
7
18
|
}
|
|
@@ -12,9 +12,20 @@
|
|
|
12
12
|
exports.IsPredicateVerbNode = void 0;
|
|
13
13
|
const IsVerbNode_1 = require("./IsVerbNode");
|
|
14
14
|
class IsPredicateVerbNode extends IsVerbNode_1.IsVerbNode {
|
|
15
|
+
/**
|
|
16
|
+
* Stores the wordnet for checking the pos tag of the synset.
|
|
17
|
+
* @param wordNet Wordnet used for checking the pos tag of the synset.
|
|
18
|
+
*/
|
|
15
19
|
constructor(wordNet) {
|
|
16
20
|
super(wordNet);
|
|
17
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Checks if the node is a leaf node and at least one of the semantic ids of the parse node belong to a verb synset,
|
|
24
|
+
* and the semantic role of the node is PREDICATE.
|
|
25
|
+
* @param parseNode Parse node to check.
|
|
26
|
+
* @return True if the node is a leaf node and at least one of the semantic ids of the parse node belong to a verb
|
|
27
|
+
* synset and the semantic role of the node is PREDICATE, false otherwise.
|
|
28
|
+
*/
|
|
18
29
|
satisfies(parseNode) {
|
|
19
30
|
let layerInfo = parseNode.getLayerInfo();
|
|
20
31
|
return super.satisfies(parseNode)
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"IsPredicateVerbNode.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsPredicateVerbNode.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAIxC,MAAa,mBAAoB,SAAQ,uBAAU;QAE/C;;;WAGG;QACH,YAAY,OAAgB;YACxB,KAAK,CAAC,OAAO,CAAC,CAAC;QACnB,CAAC;QAED;;;;;;WAMG;QACH,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;IAzBD,kDAyBC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { IsLeafNode } from "./IsLeafNode";
|
|
2
2
|
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
3
3
|
export declare class IsProperNoun extends IsLeafNode {
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the node is a leaf node and its parent has the tag NNP or NNPS.
|
|
6
|
+
* @param parseNode Parse node to check.
|
|
7
|
+
* @return True if the node is a leaf node and its parent has the tag NNP or NNPS, false otherwise.
|
|
8
|
+
*/
|
|
4
9
|
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
5
10
|
}
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
exports.IsProperNoun = void 0;
|
|
13
13
|
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
14
|
class IsProperNoun extends IsLeafNode_1.IsLeafNode {
|
|
15
|
+
/**
|
|
16
|
+
* Checks if the node is a leaf node and its parent has the tag NNP or NNPS.
|
|
17
|
+
* @param parseNode Parse node to check.
|
|
18
|
+
* @return True if the node is a leaf node and its parent has the tag NNP or NNPS, false otherwise.
|
|
19
|
+
*/
|
|
15
20
|
satisfies(parseNode) {
|
|
16
21
|
if (super.satisfies(parseNode)) {
|
|
17
22
|
let parentData = parseNode.getParent().getData().getName();
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"IsProperNoun.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsProperNoun.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAGxC,MAAa,YAAa,SAAQ,uBAAU;QAExC;;;;WAIG;QACH,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;IAfD,oCAeC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { IsLeafNode } from "./IsLeafNode";
|
|
2
2
|
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
3
3
|
export declare class IsPunctuationNode extends IsLeafNode {
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the node is a leaf node and contains punctuation as the data.
|
|
6
|
+
* @param parseNode Parse node to check.
|
|
7
|
+
* @return True if the node is a leaf node and contains punctuation as the data, false otherwise.
|
|
8
|
+
*/
|
|
4
9
|
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
5
10
|
}
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
15
|
const Word_1 = require("nlptoolkit-dictionary/dist/Dictionary/Word");
|
|
16
16
|
class IsPunctuationNode extends IsLeafNode_1.IsLeafNode {
|
|
17
|
+
/**
|
|
18
|
+
* Checks if the node is a leaf node and contains punctuation as the data.
|
|
19
|
+
* @param parseNode Parse node to check.
|
|
20
|
+
* @return True if the node is a leaf node and contains punctuation as the data, false otherwise.
|
|
21
|
+
*/
|
|
17
22
|
satisfies(parseNode) {
|
|
18
23
|
if (super.satisfies(parseNode)) {
|
|
19
24
|
let data = parseNode.getLayerData(ViewLayerType_1.ViewLayerType.ENGLISH_WORD);
|
|
@@ -1 +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;
|
|
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;;;;WAIG;QACH,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;IAfD,8CAeC"}
|
|
@@ -4,5 +4,10 @@ import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
|
4
4
|
export declare class IsTransferable extends IsLeafNode {
|
|
5
5
|
private secondLanguage;
|
|
6
6
|
constructor(secondLanguage: ViewLayerType);
|
|
7
|
+
/**
|
|
8
|
+
* Checks if the node is a leaf node and is not a None or Null node.
|
|
9
|
+
* @param parseNode Parse node to check.
|
|
10
|
+
* @return True if the node is a leaf node and is not a None or Null node, false otherwise.
|
|
11
|
+
*/
|
|
7
12
|
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
8
13
|
}
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
super();
|
|
19
19
|
this.secondLanguage = secondLanguage;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Checks if the node is a leaf node and is not a None or Null node.
|
|
23
|
+
* @param parseNode Parse node to check.
|
|
24
|
+
* @return True if the node is a leaf node and is not a None or Null node, false otherwise.
|
|
25
|
+
*/
|
|
21
26
|
satisfies(parseNode) {
|
|
22
27
|
if (super.satisfies(parseNode)) {
|
|
23
28
|
if (new IsNoneNode_1.IsNoneNode(this.secondLanguage).satisfies(parseNode)) {
|
|
@@ -1 +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;
|
|
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;;;;WAIG;QACH,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;IAxBD,wCAwBC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { IsLeafNode } from "./IsLeafNode";
|
|
2
2
|
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
3
3
|
export declare class IsTurkishLeafNode extends IsLeafNode {
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the parse node is a leaf node and contains a valid Turkish word in its data.
|
|
6
|
+
* @param parseNode Parse node to check.
|
|
7
|
+
* @return True if the parse node is a leaf node and contains a valid Turkish word in its data; false otherwise.
|
|
8
|
+
*/
|
|
4
9
|
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
5
10
|
}
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
const IsLeafNode_1 = require("./IsLeafNode");
|
|
14
14
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
15
|
class IsTurkishLeafNode extends IsLeafNode_1.IsLeafNode {
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the parse node is a leaf node and contains a valid Turkish word in its data.
|
|
18
|
+
* @param parseNode Parse node to check.
|
|
19
|
+
* @return True if the parse node is a leaf node and contains a valid Turkish word in its data; false otherwise.
|
|
20
|
+
*/
|
|
16
21
|
satisfies(parseNode) {
|
|
17
22
|
if (super.satisfies(parseNode)) {
|
|
18
23
|
let data = parseNode.getLayerInfo().getLayerData(ViewLayerType_1.ViewLayerType.TURKISH_WORD);
|
|
@@ -1 +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;
|
|
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;;;;WAIG;QACH,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;IAhBD,8CAgBC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { NodeDrawableCondition } from "./NodeDrawableCondition";
|
|
2
2
|
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
3
3
|
export declare class IsVPNode implements NodeDrawableCondition {
|
|
4
|
+
/**
|
|
5
|
+
* Checks if the node is not a leaf node and its tag is VP.
|
|
6
|
+
* @param parseNode Parse node to check.
|
|
7
|
+
* @return True if the node is not a leaf node and its tag is VP, false otherwise.
|
|
8
|
+
*/
|
|
4
9
|
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
5
10
|
}
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.IsVPNode = void 0;
|
|
13
13
|
class IsVPNode {
|
|
14
|
+
/**
|
|
15
|
+
* Checks if the node is not a leaf node and its tag is VP.
|
|
16
|
+
* @param parseNode Parse node to check.
|
|
17
|
+
* @return True if the node is not a leaf node and its tag is VP, false otherwise.
|
|
18
|
+
*/
|
|
14
19
|
satisfies(parseNode) {
|
|
15
20
|
return parseNode.numberOfChildren() > 0 && parseNode.getData().isVP();
|
|
16
21
|
}
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"IsVPNode.js","sourceRoot":"","sources":["../../../source/Processor/Condition/IsVPNode.ts"],"names":[],"mappings":";;;;;;;;;;;;IAGA,MAAa,QAAQ;QAEjB;;;;WAIG;QACH,SAAS,CAAC,SAA4B;YAClC,OAAO,SAAS,CAAC,gBAAgB,EAAE,GAAG,CAAC,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC;QAC1E,CAAC;KAEJ;IAXD,4BAWC"}
|
|
@@ -3,6 +3,16 @@ import { WordNet } from "nlptoolkit-wordnet/dist/WordNet";
|
|
|
3
3
|
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
4
4
|
export declare class IsVerbNode extends IsLeafNode {
|
|
5
5
|
private wordNet;
|
|
6
|
+
/**
|
|
7
|
+
* Stores the wordnet for checking the pos tag of the synset.
|
|
8
|
+
* @param wordNet Wordnet used for checking the pos tag of the synset.
|
|
9
|
+
*/
|
|
6
10
|
constructor(wordNet: WordNet);
|
|
11
|
+
/**
|
|
12
|
+
* Checks if the node is a leaf node and at least one of the semantic ids of the parse node belong to a verb synset.
|
|
13
|
+
* @param parseNode Parse node to check.
|
|
14
|
+
* @return True if the node is a leaf node and at least one of the semantic ids of the parse node belong to a verb
|
|
15
|
+
* synset, false otherwise.
|
|
16
|
+
*/
|
|
7
17
|
satisfies(parseNode: ParseNodeDrawable): boolean;
|
|
8
18
|
}
|
|
@@ -14,10 +14,20 @@
|
|
|
14
14
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
15
|
const Pos_1 = require("nlptoolkit-dictionary/dist/Dictionary/Pos");
|
|
16
16
|
class IsVerbNode extends IsLeafNode_1.IsLeafNode {
|
|
17
|
+
/**
|
|
18
|
+
* Stores the wordnet for checking the pos tag of the synset.
|
|
19
|
+
* @param wordNet Wordnet used for checking the pos tag of the synset.
|
|
20
|
+
*/
|
|
17
21
|
constructor(wordNet) {
|
|
18
22
|
super();
|
|
19
23
|
this.wordNet = wordNet;
|
|
20
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Checks if the node is a leaf node and at least one of the semantic ids of the parse node belong to a verb synset.
|
|
27
|
+
* @param parseNode Parse node to check.
|
|
28
|
+
* @return True if the node is a leaf node and at least one of the semantic ids of the parse node belong to a verb
|
|
29
|
+
* synset, false otherwise.
|
|
30
|
+
*/
|
|
21
31
|
satisfies(parseNode) {
|
|
22
32
|
let layerInfo = parseNode.getLayerInfo();
|
|
23
33
|
if (super.satisfies(parseNode) && layerInfo != null && layerInfo.getLayerData(ViewLayerType_1.ViewLayerType.SEMANTICS) != null) {
|
|
@@ -1 +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;
|
|
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;;;WAGG;QACH,YAAY,OAAgB;YACxB,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAC1B,CAAC;QAED;;;;;WAKG;QACH,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;IAhCD,gCAgCC"}
|
|
@@ -3,6 +3,15 @@ import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
|
3
3
|
import { ViewLayerType } from "nlptoolkit-annotatedsentence/dist/ViewLayerType";
|
|
4
4
|
export declare class ContainsLayerInformation implements LeafListCondition {
|
|
5
5
|
private readonly viewLayerType;
|
|
6
|
+
/**
|
|
7
|
+
* Constructor for ContainsLayerInformation class. Sets the viewLayerType attribute.
|
|
8
|
+
* @param viewLayerType Layer for which check is done.
|
|
9
|
+
*/
|
|
6
10
|
constructor(viewLayerType: ViewLayerType);
|
|
11
|
+
/**
|
|
12
|
+
* Checks if all leaf nodes in the leafList contains the given layer information.
|
|
13
|
+
* @param leafList Array list storing the leaf nodes.
|
|
14
|
+
* @return True if all leaf nodes in the leafList contains the given layer information, false otherwise.
|
|
15
|
+
*/
|
|
7
16
|
satisfies(leafList: Array<ParseNodeDrawable>): boolean;
|
|
8
17
|
}
|
|
@@ -13,9 +13,18 @@
|
|
|
13
13
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
14
14
|
const IsTurkishLeafNode_1 = require("../Condition/IsTurkishLeafNode");
|
|
15
15
|
class ContainsLayerInformation {
|
|
16
|
+
/**
|
|
17
|
+
* Constructor for ContainsLayerInformation class. Sets the viewLayerType attribute.
|
|
18
|
+
* @param viewLayerType Layer for which check is done.
|
|
19
|
+
*/
|
|
16
20
|
constructor(viewLayerType) {
|
|
17
21
|
this.viewLayerType = viewLayerType;
|
|
18
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Checks if all leaf nodes in the leafList contains the given layer information.
|
|
25
|
+
* @param leafList Array list storing the leaf nodes.
|
|
26
|
+
* @return True if all leaf nodes in the leafList contains the given layer information, false otherwise.
|
|
27
|
+
*/
|
|
19
28
|
satisfies(leafList) {
|
|
20
29
|
for (let parseNode of leafList) {
|
|
21
30
|
if (!parseNode.getLayerData(ViewLayerType_1.ViewLayerType.ENGLISH_WORD).includes("*")) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainsLayerInformation.js","sourceRoot":"","sources":["../../../source/Processor/LayerExist/ContainsLayerInformation.ts"],"names":[],"mappings":";;;;;;;;;;;;IAEA,mFAA8E;IAC9E,sEAAiE;IAEjE,MAAa,wBAAwB;QAIjC,YAAY,aAA4B;YACpC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QACtC,CAAC;QAED,SAAS,CAAC,QAAkC;YACxC,KAAK,IAAI,SAAS,IAAI,QAAQ,EAAC;gBAC3B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAC;oBAClE,QAAQ,IAAI,CAAC,aAAa,EAAC;wBACvB,KAAK,6BAAa,CAAC,YAAY;4BAC3B,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,EAAC;gCACnD,OAAO,KAAK,CAAC;6BAChB;4BACD,MAAM;wBACV,KAAK,6BAAa,CAAC,cAAc,CAAC;wBAClC,KAAK,6BAAa,CAAC,kBAAkB,CAAC;wBACtC,KAAK,6BAAa,CAAC,GAAG,CAAC;wBACvB,KAAK,6BAAa,CAAC,SAAS,CAAC;wBAC7B,KAAK,6BAAa,CAAC,QAAQ;4BACvB,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,IAAI,IAAI,qCAAiB,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gCACnG,OAAO,KAAK,CAAC;6BAChB;4BACD,MAAM;qBACb;iBACJ;aACJ;YACD,OAAO,IAAI,CAAC;QAChB,CAAC;KAEJ;
|
|
1
|
+
{"version":3,"file":"ContainsLayerInformation.js","sourceRoot":"","sources":["../../../source/Processor/LayerExist/ContainsLayerInformation.ts"],"names":[],"mappings":";;;;;;;;;;;;IAEA,mFAA8E;IAC9E,sEAAiE;IAEjE,MAAa,wBAAwB;QAIjC;;;WAGG;QACH,YAAY,aAA4B;YACpC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QACtC,CAAC;QAED;;;;WAIG;QACH,SAAS,CAAC,QAAkC;YACxC,KAAK,IAAI,SAAS,IAAI,QAAQ,EAAC;gBAC3B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAC;oBAClE,QAAQ,IAAI,CAAC,aAAa,EAAC;wBACvB,KAAK,6BAAa,CAAC,YAAY;4BAC3B,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,EAAC;gCACnD,OAAO,KAAK,CAAC;6BAChB;4BACD,MAAM;wBACV,KAAK,6BAAa,CAAC,cAAc,CAAC;wBAClC,KAAK,6BAAa,CAAC,kBAAkB,CAAC;wBACtC,KAAK,6BAAa,CAAC,GAAG,CAAC;wBACvB,KAAK,6BAAa,CAAC,SAAS,CAAC;wBAC7B,KAAK,6BAAa,CAAC,QAAQ;4BACvB,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,IAAI,IAAI,qCAAiB,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gCACnG,OAAO,KAAK,CAAC;6BAChB;4BACD,MAAM;qBACb;iBACJ;aACJ;YACD,OAAO,IAAI,CAAC;QAChB,CAAC;KAEJ;IAzCD,4DAyCC"}
|
|
@@ -3,6 +3,15 @@ import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
|
3
3
|
import { ViewLayerType } from "nlptoolkit-annotatedsentence/dist/ViewLayerType";
|
|
4
4
|
export declare class NotContainsLayerInformation implements LeafListCondition {
|
|
5
5
|
private readonly viewLayerType;
|
|
6
|
+
/**
|
|
7
|
+
* Constructor for NotContainsLayerInformation class. Sets the viewLayerType attribute.
|
|
8
|
+
* @param viewLayerType Layer for which check is done.
|
|
9
|
+
*/
|
|
6
10
|
constructor(viewLayerType: ViewLayerType);
|
|
11
|
+
/**
|
|
12
|
+
* Checks if none of the leaf nodes in the leafList contains the given layer information.
|
|
13
|
+
* @param leafList Array list storing the leaf nodes.
|
|
14
|
+
* @return True if none of the leaf nodes in the leafList contains the given layer information, false otherwise.
|
|
15
|
+
*/
|
|
7
16
|
satisfies(leafList: Array<ParseNodeDrawable>): boolean;
|
|
8
17
|
}
|
|
@@ -13,9 +13,18 @@
|
|
|
13
13
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
14
14
|
const IsTurkishLeafNode_1 = require("../Condition/IsTurkishLeafNode");
|
|
15
15
|
class NotContainsLayerInformation {
|
|
16
|
+
/**
|
|
17
|
+
* Constructor for NotContainsLayerInformation class. Sets the viewLayerType attribute.
|
|
18
|
+
* @param viewLayerType Layer for which check is done.
|
|
19
|
+
*/
|
|
16
20
|
constructor(viewLayerType) {
|
|
17
21
|
this.viewLayerType = viewLayerType;
|
|
18
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Checks if none of the leaf nodes in the leafList contains the given layer information.
|
|
25
|
+
* @param leafList Array list storing the leaf nodes.
|
|
26
|
+
* @return True if none of the leaf nodes in the leafList contains the given layer information, false otherwise.
|
|
27
|
+
*/
|
|
19
28
|
satisfies(leafList) {
|
|
20
29
|
for (let parseNode of leafList) {
|
|
21
30
|
if (!parseNode.getLayerData(ViewLayerType_1.ViewLayerType.ENGLISH_WORD).includes("*")) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotContainsLayerInformation.js","sourceRoot":"","sources":["../../../source/Processor/LayerExist/NotContainsLayerInformation.ts"],"names":[],"mappings":";;;;;;;;;;;;IAEA,mFAA8E;IAC9E,sEAAiE;IAEjE,MAAa,2BAA2B;QAIpC,YAAY,aAA4B;YACpC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QACtC,CAAC;QAED,SAAS,CAAC,QAAkC;YACxC,KAAK,IAAI,SAAS,IAAI,QAAQ,EAAC;gBAC3B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBACnE,QAAQ,IAAI,CAAC,aAAa,EAAC;wBACvB,KAAK,6BAAa,CAAC,YAAY;4BAC3B,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,EAAC;gCACnD,OAAO,KAAK,CAAC;6BAChB;4BACD,MAAM;wBACV,KAAK,6BAAa,CAAC,cAAc,CAAC;wBAClC,KAAK,6BAAa,CAAC,kBAAkB,CAAC;wBACtC,KAAK,6BAAa,CAAC,GAAG,CAAC;wBACvB,KAAK,6BAAa,CAAC,SAAS;4BACxB,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,IAAI,IAAI,qCAAiB,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gCACnG,OAAO,KAAK,CAAC;6BAChB;4BACD,MAAM;qBACb;iBACJ;aACJ;YACD,OAAO,IAAI,CAAC;QAChB,CAAC;KAEJ;
|
|
1
|
+
{"version":3,"file":"NotContainsLayerInformation.js","sourceRoot":"","sources":["../../../source/Processor/LayerExist/NotContainsLayerInformation.ts"],"names":[],"mappings":";;;;;;;;;;;;IAEA,mFAA8E;IAC9E,sEAAiE;IAEjE,MAAa,2BAA2B;QAIpC;;;WAGG;QACH,YAAY,aAA4B;YACpC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QACtC,CAAC;QAED;;;;WAIG;QACH,SAAS,CAAC,QAAkC;YACxC,KAAK,IAAI,SAAS,IAAI,QAAQ,EAAC;gBAC3B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBACnE,QAAQ,IAAI,CAAC,aAAa,EAAC;wBACvB,KAAK,6BAAa,CAAC,YAAY;4BAC3B,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,EAAC;gCACnD,OAAO,KAAK,CAAC;6BAChB;4BACD,MAAM;wBACV,KAAK,6BAAa,CAAC,cAAc,CAAC;wBAClC,KAAK,6BAAa,CAAC,kBAAkB,CAAC;wBACtC,KAAK,6BAAa,CAAC,GAAG,CAAC;wBACvB,KAAK,6BAAa,CAAC,SAAS;4BACxB,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,IAAI,IAAI,qCAAiB,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gCACnG,OAAO,KAAK,CAAC;6BAChB;4BACD,MAAM;qBACb;iBACJ;aACJ;YACD,OAAO,IAAI,CAAC;QAChB,CAAC;KAEJ;IAxCD,kEAwCC"}
|
|
@@ -3,6 +3,16 @@ import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
|
3
3
|
import { ViewLayerType } from "nlptoolkit-annotatedsentence/dist/ViewLayerType";
|
|
4
4
|
export declare class SemiContainsLayerInformation implements LeafListCondition {
|
|
5
5
|
private readonly viewLayerType;
|
|
6
|
+
/**
|
|
7
|
+
* Constructor for SemiContainsLayerInformation class. Sets the viewLayerType attribute.
|
|
8
|
+
* @param viewLayerType Layer for which check is done.
|
|
9
|
+
*/
|
|
6
10
|
constructor(viewLayerType: ViewLayerType);
|
|
11
|
+
/**
|
|
12
|
+
* Checks if some (but not all) of the leaf nodes in the leafList contains the given layer information.
|
|
13
|
+
* @param leafList Array list storing the leaf nodes.
|
|
14
|
+
* @return True if some (but not all) of the leaf nodes in the leafList contains the given layer information, false
|
|
15
|
+
* otherwise.
|
|
16
|
+
*/
|
|
7
17
|
satisfies(leafList: Array<ParseNodeDrawable>): boolean;
|
|
8
18
|
}
|
|
@@ -13,9 +13,19 @@
|
|
|
13
13
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
14
14
|
const IsTurkishLeafNode_1 = require("../Condition/IsTurkishLeafNode");
|
|
15
15
|
class SemiContainsLayerInformation {
|
|
16
|
+
/**
|
|
17
|
+
* Constructor for SemiContainsLayerInformation class. Sets the viewLayerType attribute.
|
|
18
|
+
* @param viewLayerType Layer for which check is done.
|
|
19
|
+
*/
|
|
16
20
|
constructor(viewLayerType) {
|
|
17
21
|
this.viewLayerType = viewLayerType;
|
|
18
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Checks if some (but not all) of the leaf nodes in the leafList contains the given layer information.
|
|
25
|
+
* @param leafList Array list storing the leaf nodes.
|
|
26
|
+
* @return True if some (but not all) of the leaf nodes in the leafList contains the given layer information, false
|
|
27
|
+
* otherwise.
|
|
28
|
+
*/
|
|
19
29
|
satisfies(leafList) {
|
|
20
30
|
let notDone = 0, done = 0;
|
|
21
31
|
for (let parseNode of leafList) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemiContainsLayerInformation.js","sourceRoot":"","sources":["../../../source/Processor/LayerExist/SemiContainsLayerInformation.ts"],"names":[],"mappings":";;;;;;;;;;;;IAEA,mFAA8E;IAC9E,sEAAiE;IAEjE,MAAa,4BAA4B;QAIrC,YAAY,aAA4B;YACpC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QACtC,CAAC;QAED,SAAS,CAAC,QAAkC;YACxC,IAAI,OAAO,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC;YAC1B,KAAK,IAAI,SAAS,IAAI,QAAQ,EAAC;gBAC3B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBACnE,QAAQ,IAAI,CAAC,aAAa,EAAC;wBACvB,KAAK,6BAAa,CAAC,YAAY;4BAC3B,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,EAAC;gCACnD,IAAI,EAAE,CAAC;6BACV;iCAAM;gCACH,OAAO,EAAE,CAAC;6BACb;4BACD,MAAM;wBACV,KAAK,6BAAa,CAAC,cAAc,CAAC;wBAClC,KAAK,6BAAa,CAAC,kBAAkB,CAAC;wBACtC,KAAK,6BAAa,CAAC,GAAG,CAAC;wBACvB,KAAK,6BAAa,CAAC,SAAS;4BACxB,IAAI,IAAI,qCAAiB,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gCAC7C,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,EAAC;oCACnD,IAAI,EAAE,CAAC;iCACV;qCAAM;oCACH,OAAO,EAAE,CAAC;iCACb;6BACJ;4BACD,MAAM;qBACb;iBACJ;aACJ;YACD,OAAO,IAAI,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC;QACrC,CAAC;KAEJ;
|
|
1
|
+
{"version":3,"file":"SemiContainsLayerInformation.js","sourceRoot":"","sources":["../../../source/Processor/LayerExist/SemiContainsLayerInformation.ts"],"names":[],"mappings":";;;;;;;;;;;;IAEA,mFAA8E;IAC9E,sEAAiE;IAEjE,MAAa,4BAA4B;QAIrC;;;WAGG;QACH,YAAY,aAA4B;YACpC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QACtC,CAAC;QAED;;;;;WAKG;QACH,SAAS,CAAC,QAAkC;YACxC,IAAI,OAAO,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC;YAC1B,KAAK,IAAI,SAAS,IAAI,QAAQ,EAAC;gBAC3B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBACnE,QAAQ,IAAI,CAAC,aAAa,EAAC;wBACvB,KAAK,6BAAa,CAAC,YAAY;4BAC3B,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,EAAC;gCACnD,IAAI,EAAE,CAAC;6BACV;iCAAM;gCACH,OAAO,EAAE,CAAC;6BACb;4BACD,MAAM;wBACV,KAAK,6BAAa,CAAC,cAAc,CAAC;wBAClC,KAAK,6BAAa,CAAC,kBAAkB,CAAC;wBACtC,KAAK,6BAAa,CAAC,GAAG,CAAC;wBACvB,KAAK,6BAAa,CAAC,SAAS;4BACxB,IAAI,IAAI,qCAAiB,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,EAAC;gCAC7C,IAAI,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,EAAC;oCACnD,IAAI,EAAE,CAAC;iCACV;qCAAM;oCACH,OAAO,EAAE,CAAC;iCACb;6BACJ;4BACD,MAAM;qBACb;iBACJ;aACJ;YACD,OAAO,IAAI,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC;QACrC,CAAC;KAEJ;IAhDD,oEAgDC"}
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
14
14
|
const LeafToLanguageConverter_1 = require("./LeafToLanguageConverter");
|
|
15
15
|
class LeafToEnglish extends LeafToLanguageConverter_1.LeafToLanguageConverter {
|
|
16
|
+
/**
|
|
17
|
+
* Constructor for LeafToEnglish. Sets viewLayerType to ENGLISH.
|
|
18
|
+
*/
|
|
16
19
|
constructor() {
|
|
17
20
|
super();
|
|
18
21
|
this.viewLayerType = ViewLayerType_1.ViewLayerType.ENGLISH_WORD;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeafToEnglish.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToEnglish.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,mFAA8E;IAC9E,uEAAkE;IAElE,MAAa,aAAc,SAAQ,iDAAuB;QAEtD;YACI,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,aAAa,GAAG,6BAAa,CAAC,YAAY,CAAC;QACpD,CAAC;KAEJ;
|
|
1
|
+
{"version":3,"file":"LeafToEnglish.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToEnglish.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,mFAA8E;IAC9E,uEAAkE;IAElE,MAAa,aAAc,SAAQ,iDAAuB;QAEtD;;WAEG;QACH;YACI,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,aAAa,GAAG,6BAAa,CAAC,YAAY,CAAC;QACpD,CAAC;KAEJ;IAVD,sCAUC"}
|
|
@@ -3,5 +3,12 @@ import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
|
3
3
|
import { ViewLayerType } from "nlptoolkit-annotatedsentence/dist/ViewLayerType";
|
|
4
4
|
export declare class LeafToLanguageConverter implements LeafToStringConverter {
|
|
5
5
|
protected viewLayerType: ViewLayerType;
|
|
6
|
+
/**
|
|
7
|
+
* Converts the data in the leaf node to string, except shortcuts to parentheses are converted to its normal forms,
|
|
8
|
+
* '*', '0', '-NONE-' are converted to empty string.
|
|
9
|
+
* @param leafNode Node to be converted to string.
|
|
10
|
+
* @return String form of the data, except shortcuts to parentheses are converted to its normal forms,
|
|
11
|
+
* '*', '0', '-NONE-' are converted to empty string.
|
|
12
|
+
*/
|
|
6
13
|
leafConverter(leafNode: ParseNodeDrawable): string;
|
|
7
14
|
}
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.LeafToLanguageConverter = void 0;
|
|
13
13
|
class LeafToLanguageConverter {
|
|
14
|
+
/**
|
|
15
|
+
* Converts the data in the leaf node to string, except shortcuts to parentheses are converted to its normal forms,
|
|
16
|
+
* '*', '0', '-NONE-' are converted to empty string.
|
|
17
|
+
* @param leafNode Node to be converted to string.
|
|
18
|
+
* @return String form of the data, except shortcuts to parentheses are converted to its normal forms,
|
|
19
|
+
* '*', '0', '-NONE-' are converted to empty string.
|
|
20
|
+
*/
|
|
14
21
|
leafConverter(leafNode) {
|
|
15
22
|
let layerData = leafNode.getLayerData(this.viewLayerType);
|
|
16
23
|
let parentLayerData = leafNode.getParent().getLayerData(this.viewLayerType);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeafToLanguageConverter.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToLanguageConverter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAIA,MAAa,uBAAuB;QAIhC,aAAa,CAAC,QAA2B;YACrC,IAAI,SAAS,GAAG,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC1D,IAAI,eAAe,GAAuB,QAAQ,CAAC,SAAS,EAAG,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACjG,IAAI,SAAS,IAAI,IAAI,EAAC;gBAClB,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,IAAI,GAAG,IAAI,eAAe,IAAI,QAAQ,CAAC,EAAC;oBAC7E,OAAO,EAAE,CAAC;iBACb;qBAAM;oBACH,OAAO,GAAG,GAAG,SAAS;yBACjB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;iBAC9B;aACJ;iBAAM;gBACH,OAAO,EAAE,CAAC;aACb;QACL,CAAC;KAEJ;
|
|
1
|
+
{"version":3,"file":"LeafToLanguageConverter.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToLanguageConverter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAIA,MAAa,uBAAuB;QAIhC;;;;;;WAMG;QACH,aAAa,CAAC,QAA2B;YACrC,IAAI,SAAS,GAAG,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC1D,IAAI,eAAe,GAAuB,QAAQ,CAAC,SAAS,EAAG,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACjG,IAAI,SAAS,IAAI,IAAI,EAAC;gBAClB,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,IAAI,GAAG,IAAI,eAAe,IAAI,QAAQ,CAAC,EAAC;oBAC7E,OAAO,EAAE,CAAC;iBACb;qBAAM;oBACH,OAAO,GAAG,GAAG,SAAS;yBACjB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;yBACrB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;iBAC9B;aACJ;iBAAM;gBACH,OAAO,EAAE,CAAC;aACb;QACL,CAAC;KAEJ;IArCD,0DAqCC"}
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
const LeafToLanguageConverter_1 = require("./LeafToLanguageConverter");
|
|
14
14
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
15
|
class LeafToPersian extends LeafToLanguageConverter_1.LeafToLanguageConverter {
|
|
16
|
+
/**
|
|
17
|
+
* Constructor for LeafToPersian. Sets viewLayerType to PERSIAN.
|
|
18
|
+
*/
|
|
16
19
|
constructor() {
|
|
17
20
|
super();
|
|
18
21
|
this.viewLayerType = ViewLayerType_1.ViewLayerType.PERSIAN_WORD;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeafToPersian.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToPersian.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,uEAAkE;IAClE,mFAA8E;IAE9E,MAAa,aAAc,SAAQ,iDAAuB;QAEtD;YACI,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,aAAa,GAAG,6BAAa,CAAC,YAAY,CAAA;QACnD,CAAC;KACJ;
|
|
1
|
+
{"version":3,"file":"LeafToPersian.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToPersian.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,uEAAkE;IAClE,mFAA8E;IAE9E,MAAa,aAAc,SAAQ,iDAAuB;QAEtD;;WAEG;QACH;YACI,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,aAAa,GAAG,6BAAa,CAAC,YAAY,CAAA;QACnD,CAAC;KACJ;IATD,sCASC"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { LeafToStringConverter } from "./LeafToStringConverter";
|
|
2
2
|
import { ParseNodeDrawable } from "../../ParseNodeDrawable";
|
|
3
3
|
export declare class LeafToRootFormConverter implements LeafToStringConverter {
|
|
4
|
+
/**
|
|
5
|
+
* Converts the data in the leaf node to string. If there are multiple words in the leaf node, they are concatenated
|
|
6
|
+
* with space.
|
|
7
|
+
* @param parseNodeDrawable Node to be converted to string.
|
|
8
|
+
* @return String form of the data. If there are multiple words in the leaf node, they are concatenated
|
|
9
|
+
* with space.
|
|
10
|
+
*/
|
|
4
11
|
leafConverter(parseNodeDrawable: ParseNodeDrawable): string;
|
|
5
12
|
}
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.LeafToRootFormConverter = void 0;
|
|
13
13
|
class LeafToRootFormConverter {
|
|
14
|
+
/**
|
|
15
|
+
* Converts the data in the leaf node to string. If there are multiple words in the leaf node, they are concatenated
|
|
16
|
+
* with space.
|
|
17
|
+
* @param parseNodeDrawable Node to be converted to string.
|
|
18
|
+
* @return String form of the data. If there are multiple words in the leaf node, they are concatenated
|
|
19
|
+
* with space.
|
|
20
|
+
*/
|
|
14
21
|
leafConverter(parseNodeDrawable) {
|
|
15
22
|
let layerInfo = parseNodeDrawable.getLayerInfo();
|
|
16
23
|
let rootWords = " ";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeafToRootFormConverter.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToRootFormConverter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAGA,MAAa,uBAAuB;QAEhC,aAAa,CAAC,iBAAoC;YAC9C,IAAI,SAAS,GAAG,iBAAiB,CAAC,YAAY,EAAE,CAAC;YACjD,IAAI,SAAS,GAAG,GAAG,CAAC;YACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,gBAAgB,EAAE,EAAE,CAAC,EAAE,EAAE;gBACnD,IAAI,IAAI,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;gBACpE,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,EAAC;oBAC3B,SAAS,IAAI,GAAG,GAAG,IAAI,CAAC;iBAC3B;aACJ;YACD,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;QAChC,CAAC;KAEJ;
|
|
1
|
+
{"version":3,"file":"LeafToRootFormConverter.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToRootFormConverter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAGA,MAAa,uBAAuB;QAEhC;;;;;;WAMG;QACH,aAAa,CAAC,iBAAoC;YAC9C,IAAI,SAAS,GAAG,iBAAiB,CAAC,YAAY,EAAE,CAAC;YACjD,IAAI,SAAS,GAAG,GAAG,CAAC;YACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,gBAAgB,EAAE,EAAE,CAAC,EAAE,EAAE;gBACnD,IAAI,IAAI,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC;gBACpE,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,EAAC;oBAC3B,SAAS,IAAI,GAAG,GAAG,IAAI,CAAC;iBAC3B;aACJ;YACD,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;QAChC,CAAC;KAEJ;IArBD,0DAqBC"}
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
const LeafToLanguageConverter_1 = require("./LeafToLanguageConverter");
|
|
14
14
|
const ViewLayerType_1 = require("nlptoolkit-annotatedsentence/dist/ViewLayerType");
|
|
15
15
|
class LeafToTurkish extends LeafToLanguageConverter_1.LeafToLanguageConverter {
|
|
16
|
+
/**
|
|
17
|
+
* Constructor for LeafToPersian. Sets viewLayerType to TURKISH.
|
|
18
|
+
*/
|
|
16
19
|
constructor() {
|
|
17
20
|
super();
|
|
18
21
|
this.viewLayerType = ViewLayerType_1.ViewLayerType.TURKISH_WORD;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeafToTurkish.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToTurkish.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,uEAAkE;IAClE,mFAA8E;IAE9E,MAAa,aAAc,SAAQ,iDAAuB;QAEtD;YACI,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,aAAa,GAAG,6BAAa,CAAC,YAAY,CAAA;QACnD,CAAC;KACJ;
|
|
1
|
+
{"version":3,"file":"LeafToTurkish.js","sourceRoot":"","sources":["../../../source/Processor/LeafConverter/LeafToTurkish.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,uEAAkE;IAClE,mFAA8E;IAE9E,MAAa,aAAc,SAAQ,iDAAuB;QAEtD;;WAEG;QACH;YACI,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,aAAa,GAAG,6BAAa,CAAC,YAAY,CAAA;QACnD,CAAC;KACJ;IATD,sCASC"}
|