nlptoolkit-namedentityrecognition 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 +100 -0
- package/dist/AutoNER.d.ts +10 -0
- package/dist/AutoNER.js +26 -0
- package/dist/AutoNER.js.map +1 -0
- package/dist/Gazetteer.d.ts +23 -0
- package/dist/Gazetteer.js +50 -0
- package/dist/Gazetteer.js.map +1 -0
- package/dist/NERCorpus.d.ts +16 -0
- package/dist/NERCorpus.js +43 -0
- package/dist/NERCorpus.js.map +1 -0
- package/dist/NamedEntitySentence.d.ts +9 -0
- package/dist/NamedEntitySentence.js +73 -0
- package/dist/NamedEntitySentence.js.map +1 -0
- package/dist/NamedEntityType.d.ts +8 -0
- package/dist/NamedEntityType.js +23 -0
- package/dist/NamedEntityType.js.map +1 -0
- package/dist/NamedEntityTypeStatic.d.ts +15 -0
- package/dist/NamedEntityTypeStatic.js +62 -0
- package/dist/NamedEntityTypeStatic.js.map +1 -0
- package/dist/NamedEntityWord.d.ts +17 -0
- package/dist/NamedEntityWord.js +35 -0
- package/dist/NamedEntityWord.js.map +1 -0
- package/dist/Slot.d.ts +9 -0
- package/dist/Slot.js +60 -0
- package/dist/Slot.js.map +1 -0
- package/dist/SlotType.d.ts +5 -0
- package/dist/SlotType.js +20 -0
- package/dist/SlotType.js.map +1 -0
- package/gazetteer-location.txt +275 -0
- package/gazetteer-organization.txt +1181 -0
- package/gazetteer-person.txt +819 -0
- package/index.js +9 -0
- package/nerdata.txt +27556 -0
- package/package.json +29 -0
- package/source/AutoNER.ts +17 -0
- package/source/Gazetteer.ts +41 -0
- package/source/NERCorpus.ts +32 -0
- package/source/NamedEntitySentence.ts +58 -0
- package/source/NamedEntityType.ts +3 -0
- package/source/NamedEntityTypeStatic.ts +50 -0
- package/source/NamedEntityWord.ts +26 -0
- package/source/Slot.ts +52 -0
- package/source/SlotType.ts +3 -0
- package/source/tsconfig.json +13 -0
- package/tests/GazetteerTest.ts +24 -0
- package/tests/NERCorpusTest.ts +28 -0
- package/tests/NamedEntityTypeTest.ts +13 -0
- package/tests/SlotTest.ts +21 -0
- package/tsconfig.json +15 -0
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Named Entity Recognition Task
|
|
2
|
+
============
|
|
3
|
+
|
|
4
|
+
In named entity recognition, one tries to find the strings within a text that correspond to proper names (excluding TIME and MONEY) and classify the type of entity denoted by these strings. The problem is difficult partly due to the ambiguity in sentence segmentation; one needs to extract which words belong to a named entity, and which not. Another difficulty occurs when some word may be used as a name of either a person, an organization or a location. For example, Deniz may be used as the name of a person, or - within a compound - it can refer to a location Marmara Denizi 'Marmara Sea', or an organization Deniz Taşımacılık 'Deniz Transportation'.
|
|
5
|
+
|
|
6
|
+
The standard approach for NER is a word-by-word classification, where the classifier is trained to label the words in the text with tags that indicate the presence of particular kinds of named entities. After giving the class labels (named entity tags) to our training data, the next step is to select a group of features to discriminate different named entities for each input word.
|
|
7
|
+
|
|
8
|
+
[<sub>ORG</sub> Türk Hava Yolları] bu [<sub>TIME</sub> Pazartesi'den] itibaren [<sub>LOC</sub> İstanbul] [<sub>LOC</sub> Ankara] hattı için indirimli satışlarını [<sub>MONEY</sub> 90 TL'den] başlatacağını açıkladı.
|
|
9
|
+
|
|
10
|
+
[<sub>ORG</sub> Turkish Airlines] announced that from this [<sub>TIME</sub> Monday] on it will start its discounted fares of [<sub>MONEY</sub> 90TL] for [<sub>LOC</sub> İstanbul] [<sub>LOC</sub> Ankara] route.
|
|
11
|
+
|
|
12
|
+
See the Table below for typical generic named entity types.
|
|
13
|
+
|
|
14
|
+
|Tag|Sample Categories|
|
|
15
|
+
|---|---|
|
|
16
|
+
|PERSON|people, characters|
|
|
17
|
+
|ORGANIZATION|companies, teams|
|
|
18
|
+
|LOCATION|regions, mountains, seas|
|
|
19
|
+
|TIME|time expressions|
|
|
20
|
+
|MONEY|monetarial expressions|
|
|
21
|
+
|
|
22
|
+
For Developers
|
|
23
|
+
============
|
|
24
|
+
|
|
25
|
+
You can also see [Java](https://github.com/starlangsoftware/TurkishNamedEntityRecognition), [Python](https://github.com/starlangsoftware/TurkishNamedEntityRecognition-Py), [Cython](https://github.com/starlangsoftware/TurkishNamedEntityRecognition-Cy),
|
|
26
|
+
[Swift](https://github.com/starlangsoftware/TurkishNamedEntityRecognition-Swift), [C++](https://github.com/starlangsoftware/TurkishNamedEntityRecognition-CPP),
|
|
27
|
+
or [C#](https://github.com/starlangsoftware/TurkishNamedEntityRecognition-CS) repository.
|
|
28
|
+
|
|
29
|
+
## Requirements
|
|
30
|
+
|
|
31
|
+
* [Node.js 14 or higher](#Node.js)
|
|
32
|
+
* [Git](#git)
|
|
33
|
+
|
|
34
|
+
### Node.js
|
|
35
|
+
|
|
36
|
+
To check if you have a compatible version of Node.js installed, use the following command:
|
|
37
|
+
|
|
38
|
+
node -v
|
|
39
|
+
|
|
40
|
+
You can find the latest version of Node.js [here](https://nodejs.org/en/download/).
|
|
41
|
+
|
|
42
|
+
### Git
|
|
43
|
+
|
|
44
|
+
Install the [latest version of Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
|
|
45
|
+
|
|
46
|
+
## Npm Install
|
|
47
|
+
|
|
48
|
+
npm install nlptoolkit-namedentityrecognition
|
|
49
|
+
|
|
50
|
+
## Download Code
|
|
51
|
+
|
|
52
|
+
In order to work on code, create a fork from GitHub page.
|
|
53
|
+
Use Git for cloning the code to your local or below line for Ubuntu:
|
|
54
|
+
|
|
55
|
+
git clone <your-fork-git-link>
|
|
56
|
+
|
|
57
|
+
A directory called util will be created. Or you can use below link for exploring the code:
|
|
58
|
+
|
|
59
|
+
git clone https://github.com/starlangsoftware/namedentityrecognition-js.git
|
|
60
|
+
|
|
61
|
+
## Open project with Webstorm IDE
|
|
62
|
+
|
|
63
|
+
Steps for opening the cloned project:
|
|
64
|
+
|
|
65
|
+
* Start IDE
|
|
66
|
+
* Select **File | Open** from main menu
|
|
67
|
+
* Choose `Namedentityrecognition-Js` file
|
|
68
|
+
* Select open as project option
|
|
69
|
+
* Couple of seconds, dependencies will be downloaded.
|
|
70
|
+
|
|
71
|
+
Detailed Description
|
|
72
|
+
============
|
|
73
|
+
|
|
74
|
+
+ [Gazetteer](#gazetteer)
|
|
75
|
+
|
|
76
|
+
## Gazetteer
|
|
77
|
+
|
|
78
|
+
Bir Gazetter yüklemek için
|
|
79
|
+
|
|
80
|
+
Gazetteer(name: string, fileName: string)
|
|
81
|
+
|
|
82
|
+
Hazır Gazetteerleri kullanmak için
|
|
83
|
+
|
|
84
|
+
AutoNER()
|
|
85
|
+
|
|
86
|
+
Bir Gazetteer'de bir kelime var mı diye kontrol etmek için
|
|
87
|
+
|
|
88
|
+
contains(word: string):boolean
|
|
89
|
+
|
|
90
|
+
# Cite
|
|
91
|
+
|
|
92
|
+
@INPROCEEDINGS{8093439,
|
|
93
|
+
author={B. {Ertopçu} and A. B. {Kanburoğlu} and O. {Topsakal} and O. {Açıkgöz} and A. T. {Gürkan} and B. {Özenç} and İ. {Çam} and B. {Avar} and G. {Ercan} and O. T. {Yıldız}},
|
|
94
|
+
booktitle={2017 International Conference on Computer Science and Engineering (UBMK)},
|
|
95
|
+
title={A new approach for named entity recognition},
|
|
96
|
+
year={2017},
|
|
97
|
+
volume={},
|
|
98
|
+
number={},
|
|
99
|
+
pages={474-479},
|
|
100
|
+
doi={10.1109/UBMK.2017.8093439}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Gazetteer } from "./Gazetteer";
|
|
2
|
+
export declare abstract class AutoNER {
|
|
3
|
+
protected personGazetteer: Gazetteer;
|
|
4
|
+
protected organizationGazetteer: Gazetteer;
|
|
5
|
+
protected locationGazetteer: Gazetteer;
|
|
6
|
+
/**
|
|
7
|
+
* Constructor for creating Person, Organization, and Location gazetteers in automatic Named Entity Recognition.
|
|
8
|
+
*/
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
package/dist/AutoNER.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
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", "./Gazetteer"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AutoNER = void 0;
|
|
13
|
+
const Gazetteer_1 = require("./Gazetteer");
|
|
14
|
+
class AutoNER {
|
|
15
|
+
/**
|
|
16
|
+
* Constructor for creating Person, Organization, and Location gazetteers in automatic Named Entity Recognition.
|
|
17
|
+
*/
|
|
18
|
+
constructor() {
|
|
19
|
+
this.personGazetteer = new Gazetteer_1.Gazetteer("PERSON", "gazetteer-person.txt");
|
|
20
|
+
this.organizationGazetteer = new Gazetteer_1.Gazetteer("ORGANIZATION", "gazetteer-organization.txt");
|
|
21
|
+
this.locationGazetteer = new Gazetteer_1.Gazetteer("LOCATION", "gazetteer-location.txt");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.AutoNER = AutoNER;
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=AutoNER.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoNER.js","sourceRoot":"","sources":["../source/AutoNER.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,2CAAsC;IAEtC,MAAsB,OAAO;QAMzB;;WAEG;QACH;YACI,IAAI,CAAC,eAAe,GAAG,IAAI,qBAAS,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;YACvE,IAAI,CAAC,qBAAqB,GAAG,IAAI,qBAAS,CAAC,cAAc,EAAE,4BAA4B,CAAC,CAAC;YACzF,IAAI,CAAC,iBAAiB,GAAG,IAAI,qBAAS,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC;QACjF,CAAC;KACJ;IAdD,0BAcC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare class Gazetteer {
|
|
2
|
+
private data;
|
|
3
|
+
private name;
|
|
4
|
+
/**
|
|
5
|
+
* A constructor for a specific gazetteer. The constructor takes name of the gazetteer and file name of the
|
|
6
|
+
* gazetteer as input, reads the gazetteer from the input file.
|
|
7
|
+
* @param name Name of the gazetteer. This name will be used in programming to separate different gazetteers.
|
|
8
|
+
* @param fileName File name of the gazetteer data.
|
|
9
|
+
*/
|
|
10
|
+
constructor(name: string, fileName: string);
|
|
11
|
+
/**
|
|
12
|
+
* Accessor method for the name of the gazetteer.
|
|
13
|
+
* @return Name of the gazetteer.
|
|
14
|
+
*/
|
|
15
|
+
getName(): string;
|
|
16
|
+
/**
|
|
17
|
+
* The most important method in {@link Gazetteer} class. Checks if the given word exists in the gazetteer. The check
|
|
18
|
+
* is done in lowercase form.
|
|
19
|
+
* @param word Word to be search in Gazetteer.
|
|
20
|
+
* @return True if the word is in the Gazetteer, False otherwise.
|
|
21
|
+
*/
|
|
22
|
+
contains(word: string): boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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", "fs"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Gazetteer = void 0;
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
class Gazetteer {
|
|
15
|
+
/**
|
|
16
|
+
* A constructor for a specific gazetteer. The constructor takes name of the gazetteer and file name of the
|
|
17
|
+
* gazetteer as input, reads the gazetteer from the input file.
|
|
18
|
+
* @param name Name of the gazetteer. This name will be used in programming to separate different gazetteers.
|
|
19
|
+
* @param fileName File name of the gazetteer data.
|
|
20
|
+
*/
|
|
21
|
+
constructor(name, fileName) {
|
|
22
|
+
this.data = new Set();
|
|
23
|
+
this.name = name;
|
|
24
|
+
let data = fs.readFileSync(fileName, 'utf8');
|
|
25
|
+
let lines = data.split("\n");
|
|
26
|
+
for (let line of lines) {
|
|
27
|
+
this.data.add(line.toLocaleLowerCase("tr"));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Accessor method for the name of the gazetteer.
|
|
32
|
+
* @return Name of the gazetteer.
|
|
33
|
+
*/
|
|
34
|
+
getName() {
|
|
35
|
+
return this.name;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The most important method in {@link Gazetteer} class. Checks if the given word exists in the gazetteer. The check
|
|
39
|
+
* is done in lowercase form.
|
|
40
|
+
* @param word Word to be search in Gazetteer.
|
|
41
|
+
* @return True if the word is in the Gazetteer, False otherwise.
|
|
42
|
+
*/
|
|
43
|
+
contains(word) {
|
|
44
|
+
let lowerCase = word.toLocaleLowerCase("tr");
|
|
45
|
+
return this.data.has(lowerCase);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.Gazetteer = Gazetteer;
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=Gazetteer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gazetteer.js","sourceRoot":"","sources":["../source/Gazetteer.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,yBAAyB;IAEzB,MAAa,SAAS;QAKlB;;;;;WAKG;QACH,YAAY,IAAY,EAAE,QAAgB;YATlC,SAAI,GAAgB,IAAI,GAAG,EAAU,CAAA;YAUzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;YAChB,IAAI,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;YAC5C,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YAC5B,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;gBACpB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAA;aAC9C;QACL,CAAC;QAED;;;WAGG;QACH,OAAO;YACH,OAAO,IAAI,CAAC,IAAI,CAAA;QACpB,CAAC;QAED;;;;;WAKG;QACH,QAAQ,CAAC,IAAY;YACjB,IAAI,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;YAC5C,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QACnC,CAAC;KACJ;IAtCD,8BAsCC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Corpus } from "nlptoolkit-corpus/dist/Corpus";
|
|
2
|
+
import { Sentence } from "nlptoolkit-corpus/dist/Sentence";
|
|
3
|
+
export declare class NERCorpus extends Corpus {
|
|
4
|
+
/**
|
|
5
|
+
* Another constructor of {@link NERCorpus} which takes a fileName of the corpus as an input, reads the
|
|
6
|
+
* corpus from that file.
|
|
7
|
+
*
|
|
8
|
+
* @param fileName Name of the corpus file.
|
|
9
|
+
*/
|
|
10
|
+
constructor(fileName?: string);
|
|
11
|
+
/**
|
|
12
|
+
* addSentence adds a new sentence to the sentences {@link Array}
|
|
13
|
+
* @param s Sentence to be added.
|
|
14
|
+
*/
|
|
15
|
+
addSentence(s: Sentence): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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", "nlptoolkit-corpus/dist/Corpus", "fs", "./NamedEntitySentence"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NERCorpus = void 0;
|
|
13
|
+
const Corpus_1 = require("nlptoolkit-corpus/dist/Corpus");
|
|
14
|
+
const fs = require("fs");
|
|
15
|
+
const NamedEntitySentence_1 = require("./NamedEntitySentence");
|
|
16
|
+
class NERCorpus extends Corpus_1.Corpus {
|
|
17
|
+
/**
|
|
18
|
+
* Another constructor of {@link NERCorpus} which takes a fileName of the corpus as an input, reads the
|
|
19
|
+
* corpus from that file.
|
|
20
|
+
*
|
|
21
|
+
* @param fileName Name of the corpus file.
|
|
22
|
+
*/
|
|
23
|
+
constructor(fileName) {
|
|
24
|
+
super();
|
|
25
|
+
if (fileName != undefined) {
|
|
26
|
+
let data = fs.readFileSync(fileName, 'utf8');
|
|
27
|
+
let lines = data.split("\n");
|
|
28
|
+
for (let line of lines) {
|
|
29
|
+
this.addSentence(new NamedEntitySentence_1.NamedEntitySentence(line));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* addSentence adds a new sentence to the sentences {@link Array}
|
|
35
|
+
* @param s Sentence to be added.
|
|
36
|
+
*/
|
|
37
|
+
addSentence(s) {
|
|
38
|
+
this.sentences.push(s);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.NERCorpus = NERCorpus;
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=NERCorpus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NERCorpus.js","sourceRoot":"","sources":["../source/NERCorpus.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,0DAAqD;IACrD,yBAAyB;IACzB,+DAA0D;IAG1D,MAAa,SAAU,SAAQ,eAAM;QAEjC;;;;;WAKG;QACH,YAAY,QAAiB;YACzB,KAAK,EAAE,CAAC;YACR,IAAI,QAAQ,IAAI,SAAS,EAAC;gBACtB,IAAI,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;gBAC5C,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBAC5B,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;oBACpB,IAAI,CAAC,WAAW,CAAC,IAAI,yCAAmB,CAAC,IAAI,CAAC,CAAC,CAAA;iBAClD;aACJ;QACL,CAAC;QAED;;;WAGG;QACH,WAAW,CAAC,CAAW;YACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAC1B,CAAC;KACJ;IA1BD,8BA0BC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Sentence } from "nlptoolkit-corpus/dist/Sentence";
|
|
2
|
+
export declare class NamedEntitySentence extends Sentence {
|
|
3
|
+
/**
|
|
4
|
+
* Another constructor of {@link NamedEntitySentence}. It takes input a named entity annotated sentence in string
|
|
5
|
+
* form, divides the sentence with respect to space and sets the tagged words with respect to their tags.
|
|
6
|
+
* @param sentence Named Entity annotated sentence in string form
|
|
7
|
+
*/
|
|
8
|
+
constructor(sentence?: string);
|
|
9
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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", "nlptoolkit-corpus/dist/Sentence", "./NamedEntityType", "./NamedEntityTypeStatic", "./NamedEntityWord"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NamedEntitySentence = void 0;
|
|
13
|
+
const Sentence_1 = require("nlptoolkit-corpus/dist/Sentence");
|
|
14
|
+
const NamedEntityType_1 = require("./NamedEntityType");
|
|
15
|
+
const NamedEntityTypeStatic_1 = require("./NamedEntityTypeStatic");
|
|
16
|
+
const NamedEntityWord_1 = require("./NamedEntityWord");
|
|
17
|
+
class NamedEntitySentence extends Sentence_1.Sentence {
|
|
18
|
+
/**
|
|
19
|
+
* Another constructor of {@link NamedEntitySentence}. It takes input a named entity annotated sentence in string
|
|
20
|
+
* form, divides the sentence with respect to space and sets the tagged words with respect to their tags.
|
|
21
|
+
* @param sentence Named Entity annotated sentence in string form
|
|
22
|
+
*/
|
|
23
|
+
constructor(sentence) {
|
|
24
|
+
super();
|
|
25
|
+
if (sentence != undefined) {
|
|
26
|
+
let type = NamedEntityType_1.NamedEntityType.NONE;
|
|
27
|
+
let wordArray = sentence.split(" ");
|
|
28
|
+
for (let word of wordArray) {
|
|
29
|
+
if (word != "") {
|
|
30
|
+
if (word != "<b_enamex") {
|
|
31
|
+
if (word.startsWith("TYPE=\"")) {
|
|
32
|
+
let typeIndexEnd = word.indexOf('\"', 6);
|
|
33
|
+
if (typeIndexEnd != -1) {
|
|
34
|
+
let entityType = word.substring(6, typeIndexEnd);
|
|
35
|
+
type = NamedEntityTypeStatic_1.NamedEntityTypeStatic.getNamedEntityType(entityType);
|
|
36
|
+
}
|
|
37
|
+
if (word.endsWith("e_enamex>")) {
|
|
38
|
+
let candidate = word.substring(word.indexOf('>') + 1, word.indexOf('<'));
|
|
39
|
+
if (candidate != "") {
|
|
40
|
+
this.words.push(new NamedEntityWord_1.NamedEntityWord(candidate, type));
|
|
41
|
+
}
|
|
42
|
+
type = NamedEntityType_1.NamedEntityType.NONE;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
let candidate = word.substring(word.indexOf('>') + 1);
|
|
46
|
+
if (candidate != "") {
|
|
47
|
+
this.words.push(new NamedEntityWord_1.NamedEntityWord(candidate, type));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
if (word.endsWith("e_enamex>")) {
|
|
53
|
+
let candidate = word.substring(0, word.indexOf('<'));
|
|
54
|
+
if (candidate != "") {
|
|
55
|
+
this.words.push(new NamedEntityWord_1.NamedEntityWord(candidate, type));
|
|
56
|
+
}
|
|
57
|
+
type = NamedEntityType_1.NamedEntityType.NONE;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
if (word != "") {
|
|
61
|
+
this.words.push(new NamedEntityWord_1.NamedEntityWord(word, type));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.NamedEntitySentence = NamedEntitySentence;
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=NamedEntitySentence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamedEntitySentence.js","sourceRoot":"","sources":["../source/NamedEntitySentence.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,8DAAyD;IACzD,uDAAkD;IAElD,mEAA8D;IAC9D,uDAAkD;IAElD,MAAa,mBAAoB,SAAQ,mBAAQ;QAE7C;;;;WAIG;QACH,YAAY,QAAiB;YACzB,KAAK,EAAE,CAAC;YACR,IAAI,QAAQ,IAAI,SAAS,EAAC;gBACtB,IAAI,IAAI,GAAG,iCAAe,CAAC,IAAI,CAAC;gBAChC,IAAI,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACpC,KAAK,IAAI,IAAI,IAAI,SAAS,EAAC;oBACvB,IAAI,IAAI,IAAI,EAAE,EAAC;wBACX,IAAI,IAAI,IAAI,WAAW,EAAC;4BACpB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAC;gCAC3B,IAAI,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;gCACzC,IAAI,YAAY,IAAI,CAAC,CAAC,EAAC;oCACnB,IAAI,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;oCACjD,IAAI,GAAG,6CAAqB,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;iCAC/D;gCACD,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAC;oCAC3B,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;oCACzE,IAAI,SAAS,IAAI,EAAE,EAAC;wCAChB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,iCAAe,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;qCACzD;oCACD,IAAI,GAAG,iCAAe,CAAC,IAAI,CAAC;iCAC/B;qCAAM;oCACH,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;oCACtD,IAAI,SAAS,IAAI,EAAE,EAAC;wCAChB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,iCAAe,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;qCACzD;iCACJ;6BACJ;iCAAM;gCACH,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAC;oCAC3B,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;oCACrD,IAAI,SAAS,IAAI,EAAE,EAAC;wCAChB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,iCAAe,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;qCACzD;oCACD,IAAI,GAAG,iCAAe,CAAC,IAAI,CAAC;iCAC/B;qCAAM;oCACH,IAAI,IAAI,IAAI,EAAE,EAAC;wCACX,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,iCAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;qCACpD;iCACJ;6BACJ;yBACJ;qBACJ;iBACJ;aACJ;QACL,CAAC;KACJ;IAnDD,kDAmDC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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.NamedEntityType = void 0;
|
|
13
|
+
var NamedEntityType;
|
|
14
|
+
(function (NamedEntityType) {
|
|
15
|
+
NamedEntityType[NamedEntityType["NONE"] = 0] = "NONE";
|
|
16
|
+
NamedEntityType[NamedEntityType["PERSON"] = 1] = "PERSON";
|
|
17
|
+
NamedEntityType[NamedEntityType["ORGANIZATION"] = 2] = "ORGANIZATION";
|
|
18
|
+
NamedEntityType[NamedEntityType["LOCATION"] = 3] = "LOCATION";
|
|
19
|
+
NamedEntityType[NamedEntityType["TIME"] = 4] = "TIME";
|
|
20
|
+
NamedEntityType[NamedEntityType["MONEY"] = 5] = "MONEY";
|
|
21
|
+
})(NamedEntityType = exports.NamedEntityType || (exports.NamedEntityType = {}));
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=NamedEntityType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamedEntityType.js","sourceRoot":"","sources":["../source/NamedEntityType.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,IAAY,eAEX;IAFD,WAAY,eAAe;QACvB,qDAAI,CAAA;QAAE,yDAAM,CAAA;QAAE,qEAAY,CAAA;QAAE,6DAAQ,CAAA;QAAE,qDAAI,CAAA;QAAE,uDAAK,CAAA;IACrD,CAAC,EAFW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAE1B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NamedEntityType } from "./NamedEntityType";
|
|
2
|
+
export declare class NamedEntityTypeStatic {
|
|
3
|
+
/**
|
|
4
|
+
* Static function to convert a string entity type to {@link NamedEntityType} type.
|
|
5
|
+
* @param entityType Entity type in string form
|
|
6
|
+
* @return Entity type in {@link NamedEntityType} form
|
|
7
|
+
*/
|
|
8
|
+
static getNamedEntityType(entityType: string): NamedEntityType;
|
|
9
|
+
/**
|
|
10
|
+
* Static function to convert a {@link NamedEntityType} to string form.
|
|
11
|
+
* @param entityType Entity type in {@link NamedEntityType} form
|
|
12
|
+
* @return Entity type in string form
|
|
13
|
+
*/
|
|
14
|
+
static getNamedEntity(entityType: NamedEntityType): string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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", "./NamedEntityType"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NamedEntityTypeStatic = void 0;
|
|
13
|
+
const NamedEntityType_1 = require("./NamedEntityType");
|
|
14
|
+
class NamedEntityTypeStatic {
|
|
15
|
+
/**
|
|
16
|
+
* Static function to convert a string entity type to {@link NamedEntityType} type.
|
|
17
|
+
* @param entityType Entity type in string form
|
|
18
|
+
* @return Entity type in {@link NamedEntityType} form
|
|
19
|
+
*/
|
|
20
|
+
static getNamedEntityType(entityType) {
|
|
21
|
+
switch (entityType.toUpperCase()) {
|
|
22
|
+
case "PERSON":
|
|
23
|
+
return NamedEntityType_1.NamedEntityType.PERSON;
|
|
24
|
+
case "LOCATION":
|
|
25
|
+
return NamedEntityType_1.NamedEntityType.LOCATION;
|
|
26
|
+
case "ORGANIZATION":
|
|
27
|
+
return NamedEntityType_1.NamedEntityType.ORGANIZATION;
|
|
28
|
+
case "TIME":
|
|
29
|
+
return NamedEntityType_1.NamedEntityType.TIME;
|
|
30
|
+
case "MONEY":
|
|
31
|
+
return NamedEntityType_1.NamedEntityType.MONEY;
|
|
32
|
+
default:
|
|
33
|
+
return NamedEntityType_1.NamedEntityType.NONE;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Static function to convert a {@link NamedEntityType} to string form.
|
|
38
|
+
* @param entityType Entity type in {@link NamedEntityType} form
|
|
39
|
+
* @return Entity type in string form
|
|
40
|
+
*/
|
|
41
|
+
static getNamedEntity(entityType) {
|
|
42
|
+
if (entityType == undefined)
|
|
43
|
+
return undefined;
|
|
44
|
+
switch (entityType) {
|
|
45
|
+
case NamedEntityType_1.NamedEntityType.PERSON:
|
|
46
|
+
return "PERSON";
|
|
47
|
+
case NamedEntityType_1.NamedEntityType.LOCATION:
|
|
48
|
+
return "LOCATION";
|
|
49
|
+
case NamedEntityType_1.NamedEntityType.ORGANIZATION:
|
|
50
|
+
return "ORGANIZATION";
|
|
51
|
+
case NamedEntityType_1.NamedEntityType.TIME:
|
|
52
|
+
return "TIME";
|
|
53
|
+
case NamedEntityType_1.NamedEntityType.MONEY:
|
|
54
|
+
return "MONEY";
|
|
55
|
+
default:
|
|
56
|
+
return "NONE";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.NamedEntityTypeStatic = NamedEntityTypeStatic;
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=NamedEntityTypeStatic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamedEntityTypeStatic.js","sourceRoot":"","sources":["../source/NamedEntityTypeStatic.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,uDAAkD;IAElD,MAAa,qBAAqB;QAE9B;;;;WAIG;QACH,MAAM,CAAC,kBAAkB,CAAC,UAAkB;YACxC,QAAQ,UAAU,CAAC,WAAW,EAAE,EAAC;gBAC7B,KAAK,QAAQ;oBACT,OAAO,iCAAe,CAAC,MAAM,CAAC;gBAClC,KAAK,UAAU;oBACX,OAAO,iCAAe,CAAC,QAAQ,CAAC;gBACpC,KAAK,cAAc;oBACf,OAAO,iCAAe,CAAC,YAAY,CAAC;gBACxC,KAAK,MAAM;oBACP,OAAO,iCAAe,CAAC,IAAI,CAAC;gBAChC,KAAK,OAAO;oBACR,OAAO,iCAAe,CAAC,KAAK,CAAC;gBACjC;oBACI,OAAO,iCAAe,CAAC,IAAI,CAAC;aACnC;QACL,CAAC;QAED;;;;WAIG;QACH,MAAM,CAAC,cAAc,CAAC,UAA2B;YAC7C,IAAI,UAAU,IAAI,SAAS;gBACvB,OAAO,SAAS,CAAC;YACrB,QAAQ,UAAU,EAAC;gBACf,KAAK,iCAAe,CAAC,MAAM;oBACvB,OAAO,QAAQ,CAAC;gBACpB,KAAK,iCAAe,CAAC,QAAQ;oBACzB,OAAO,UAAU,CAAC;gBACtB,KAAK,iCAAe,CAAC,YAAY;oBAC7B,OAAO,cAAc,CAAC;gBAC1B,KAAK,iCAAe,CAAC,IAAI;oBACrB,OAAO,MAAM,CAAC;gBAClB,KAAK,iCAAe,CAAC,KAAK;oBACtB,OAAO,OAAO,CAAC;gBACnB;oBACI,OAAO,MAAM,CAAC;aACrB;QACL,CAAC;KACJ;IA/CD,sDA+CC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Word } from "nlptoolkit-dictionary/dist/Dictionary/Word";
|
|
2
|
+
import { NamedEntityType } from "./NamedEntityType";
|
|
3
|
+
export declare class NamedEntityWord extends Word {
|
|
4
|
+
private namedEntityType;
|
|
5
|
+
/**
|
|
6
|
+
* A constructor of {@link NamedEntityWord} which takes name and nameEntityType as input and sets the corresponding attributes
|
|
7
|
+
* @param name Name of the word
|
|
8
|
+
* @param namedEntityType {@link NamedEntityType} of the word
|
|
9
|
+
*/
|
|
10
|
+
constructor(name: string, namedEntityType: NamedEntityType);
|
|
11
|
+
/**
|
|
12
|
+
* Accessor method for namedEntityType attribute.
|
|
13
|
+
*
|
|
14
|
+
* @return namedEntityType of the word.
|
|
15
|
+
*/
|
|
16
|
+
getNamedEntityType(): NamedEntityType;
|
|
17
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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", "nlptoolkit-dictionary/dist/Dictionary/Word"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NamedEntityWord = void 0;
|
|
13
|
+
const Word_1 = require("nlptoolkit-dictionary/dist/Dictionary/Word");
|
|
14
|
+
class NamedEntityWord extends Word_1.Word {
|
|
15
|
+
/**
|
|
16
|
+
* A constructor of {@link NamedEntityWord} which takes name and nameEntityType as input and sets the corresponding attributes
|
|
17
|
+
* @param name Name of the word
|
|
18
|
+
* @param namedEntityType {@link NamedEntityType} of the word
|
|
19
|
+
*/
|
|
20
|
+
constructor(name, namedEntityType) {
|
|
21
|
+
super(name);
|
|
22
|
+
this.namedEntityType = namedEntityType;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Accessor method for namedEntityType attribute.
|
|
26
|
+
*
|
|
27
|
+
* @return namedEntityType of the word.
|
|
28
|
+
*/
|
|
29
|
+
getNamedEntityType() {
|
|
30
|
+
return this.namedEntityType;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.NamedEntityWord = NamedEntityWord;
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=NamedEntityWord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamedEntityWord.js","sourceRoot":"","sources":["../source/NamedEntityWord.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,qEAAgE;IAGhE,MAAa,eAAgB,SAAQ,WAAI;QAIrC;;;;WAIG;QACH,YAAY,IAAY,EAAE,eAAgC;YACtD,KAAK,CAAC,IAAI,CAAC,CAAC;YACZ,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QAC1C,CAAC;QAED;;;;WAIG;QACH,kBAAkB;YACd,OAAO,IAAI,CAAC,eAAe,CAAA;QAC/B,CAAC;KACJ;IAtBD,0CAsBC"}
|
package/dist/Slot.d.ts
ADDED
package/dist/Slot.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
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", "./SlotType"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Slot = void 0;
|
|
13
|
+
const SlotType_1 = require("./SlotType");
|
|
14
|
+
class Slot {
|
|
15
|
+
constructor(typeOrSlot, tag) {
|
|
16
|
+
if (tag != undefined) {
|
|
17
|
+
this.type = typeOrSlot;
|
|
18
|
+
this.tag = tag;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
if (typeOrSlot == "O") {
|
|
22
|
+
this.type = SlotType_1.SlotType.O;
|
|
23
|
+
this.tag = undefined;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
let type = typeOrSlot.substring(0, typeOrSlot.indexOf("-"));
|
|
27
|
+
let tag = typeOrSlot.substring(typeOrSlot.indexOf("-") + 1);
|
|
28
|
+
switch (type) {
|
|
29
|
+
case "B":
|
|
30
|
+
this.type = SlotType_1.SlotType.B;
|
|
31
|
+
break;
|
|
32
|
+
case "I":
|
|
33
|
+
this.type = SlotType_1.SlotType.I;
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
this.tag = tag;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
getType() {
|
|
41
|
+
return this.type;
|
|
42
|
+
}
|
|
43
|
+
getTag() {
|
|
44
|
+
return this.tag;
|
|
45
|
+
}
|
|
46
|
+
toString() {
|
|
47
|
+
switch (this.type) {
|
|
48
|
+
case SlotType_1.SlotType.O:
|
|
49
|
+
return "O";
|
|
50
|
+
case SlotType_1.SlotType.B:
|
|
51
|
+
return "B-" + this.tag;
|
|
52
|
+
case SlotType_1.SlotType.I:
|
|
53
|
+
return "I-" + this.tag;
|
|
54
|
+
}
|
|
55
|
+
return "";
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.Slot = Slot;
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=Slot.js.map
|
package/dist/Slot.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slot.js","sourceRoot":"","sources":["../source/Slot.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,yCAAoC;IAEpC,MAAa,IAAI;QAKb,YAAY,UAAe,EAAE,GAAY;YACrC,IAAI,GAAG,IAAI,SAAS,EAAC;gBACjB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAA;gBACtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;aACjB;iBAAM;gBACH,IAAI,UAAU,IAAI,GAAG,EAAC;oBAClB,IAAI,CAAC,IAAI,GAAG,mBAAQ,CAAC,CAAC,CAAC;oBACvB,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;iBACxB;qBAAM;oBACH,IAAI,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;oBAC5D,IAAI,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;oBAC5D,QAAQ,IAAI,EAAC;wBACT,KAAK,GAAG;4BACJ,IAAI,CAAC,IAAI,GAAG,mBAAQ,CAAC,CAAC,CAAC;4BACvB,MAAM;wBACV,KAAK,GAAG;4BACJ,IAAI,CAAC,IAAI,GAAG,mBAAQ,CAAC,CAAC,CAAC;4BACvB,MAAM;qBACb;oBACD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;iBAClB;aACJ;QACL,CAAC;QAED,OAAO;YACH,OAAO,IAAI,CAAC,IAAI,CAAA;QACpB,CAAC;QAED,MAAM;YACF,OAAO,IAAI,CAAC,GAAG,CAAA;QACnB,CAAC;QAED,QAAQ;YACJ,QAAQ,IAAI,CAAC,IAAI,EAAC;gBACd,KAAK,mBAAQ,CAAC,CAAC;oBACX,OAAO,GAAG,CAAC;gBACf,KAAK,mBAAQ,CAAC,CAAC;oBACX,OAAO,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;gBAC3B,KAAK,mBAAQ,CAAC,CAAC;oBACX,OAAO,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;aAC9B;YACD,OAAO,EAAE,CAAC;QACd,CAAC;KAEJ;IAjDD,oBAiDC"}
|