nlptoolkit-postagger 1.0.0 → 1.0.2
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 +12 -12
- package/dist/index.d.ts +6 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/package.json +10 -8
- package/source/index.ts +6 -0
- package/source/tsconfig.json +1 -1
- package/tsconfig.json +1 -2
- package/index.js +0 -6
package/README.md
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
Pos Tagging
|
|
2
|
+
============
|
|
3
|
+
|
|
1
4
|
This is a tool meant for tagging words with their part-of-speech, a grammatical category based on their function within a sentence, such as noun, adjective, verb, and so forth.
|
|
2
5
|
|
|
6
|
+
Video Lectures
|
|
7
|
+
============
|
|
8
|
+
|
|
9
|
+
[<img src="https://github.com/StarlangSoftware/EnglishPosTagger/blob/master/video1.jpg" width="50%">](https://youtu.be/gQmc7Nhwhuk)[<img src="https://github.com/StarlangSoftware/EnglishPosTagger/blob/master/video2.jpg" width="50%">](https://youtu.be/GHUib73MRks)
|
|
10
|
+
|
|
3
11
|
For Developers
|
|
4
12
|
============
|
|
5
13
|
|
|
6
14
|
You can also see [Python](https://github.com/starlangsoftware/EnglishPosTagger-Py), [Cython](https://github.com/starlangsoftware/EnglishPosTagger-Cy),
|
|
7
|
-
[C++](https://github.com/starlangsoftware/EnglishPosTagger-CPP), [Swift](https://github.com/starlangsoftware/EnglishPosTagger-Swift),
|
|
15
|
+
[C++](https://github.com/starlangsoftware/EnglishPosTagger-CPP), [C](https://github.com/starlangsoftware/EnglishPosTagger-C), [Swift](https://github.com/starlangsoftware/EnglishPosTagger-Swift),
|
|
8
16
|
[Java](https://github.com/starlangsoftware/EnglishPosTagger), or [C#](https://github.com/starlangsoftware/EnglishPosTagger-CS) repository.
|
|
9
17
|
|
|
10
18
|
## Requirements
|
|
@@ -58,19 +66,11 @@ Detailed Description
|
|
|
58
66
|
|
|
59
67
|
To train the PosTagger which is used for English pos tagging
|
|
60
68
|
|
|
61
|
-
train(
|
|
62
|
-
|
|
63
|
-
To save the trained PosTagger model
|
|
64
|
-
|
|
65
|
-
saveModel(self)
|
|
66
|
-
|
|
67
|
-
To load an already trained PosTagger model
|
|
68
|
-
|
|
69
|
-
loadModel(self)
|
|
70
|
-
|
|
69
|
+
train(corpus: PosTaggedCorpus): void;
|
|
70
|
+
|
|
71
71
|
To tag a sentence, using a newly trained or loaded PosTagger model
|
|
72
72
|
|
|
73
|
-
posTag(
|
|
73
|
+
posTag(sentence: Sentence): Sentence;
|
|
74
74
|
|
|
75
75
|
3 different PosTagger models are supported: The one that is used to tag the sentences with a random tag
|
|
76
76
|
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
+
if (k2 === undefined) k2 = k;
|
|
3
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
4
|
+
}) : (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
o[k2] = m[k];
|
|
7
|
+
}));
|
|
8
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
9
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
10
|
+
};
|
|
11
|
+
(function (factory) {
|
|
12
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
13
|
+
var v = factory(require, exports);
|
|
14
|
+
if (v !== undefined) module.exports = v;
|
|
15
|
+
}
|
|
16
|
+
else if (typeof define === "function" && define.amd) {
|
|
17
|
+
define(["require", "exports", "./DummyPosTagger", "./HmmPosTagger", "./NaivePosTagger", "./PosTaggedCorpus", "./PosTaggedWord", "./PosTagger"], factory);
|
|
18
|
+
}
|
|
19
|
+
})(function (require, exports) {
|
|
20
|
+
"use strict";
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
__exportStar(require("./DummyPosTagger"), exports);
|
|
23
|
+
__exportStar(require("./HmmPosTagger"), exports);
|
|
24
|
+
__exportStar(require("./NaivePosTagger"), exports);
|
|
25
|
+
__exportStar(require("./PosTaggedCorpus"), exports);
|
|
26
|
+
__exportStar(require("./PosTaggedWord"), exports);
|
|
27
|
+
__exportStar(require("./PosTagger"), exports);
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;IAAA,mDAAgC;IAChC,iDAA8B;IAC9B,mDAAgC;IAChC,oDAAiC;IACjC,kDAA+B;IAC/B,8CAA2B"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nlptoolkit-postagger",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "Mocha"
|
|
9
9
|
},
|
|
@@ -20,12 +20,14 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/mocha": "^9.0.0",
|
|
22
22
|
"mocha": "^9.1.3",
|
|
23
|
-
"nlptoolkit-corpus": "^1.0.0",
|
|
24
|
-
"nlptoolkit-datastructure": "^1.0.0",
|
|
25
|
-
"nlptoolkit-dictionary": "^1.0.1",
|
|
26
|
-
"nlptoolkit-hmm": "^1.0.0",
|
|
27
|
-
"nlptoolkit-math": "^1.0.0",
|
|
28
23
|
"ts-node": "^10.4.0",
|
|
29
24
|
"typescript": "^4.5.2"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"nlptoolkit-corpus": "^1.0.11",
|
|
28
|
+
"nlptoolkit-datastructure": "^1.0.8",
|
|
29
|
+
"nlptoolkit-dictionary": "^1.0.13",
|
|
30
|
+
"nlptoolkit-hmm": "^1.0.2",
|
|
31
|
+
"nlptoolkit-math": "^1.0.5"
|
|
30
32
|
}
|
|
31
33
|
}
|
package/source/index.ts
ADDED
package/source/tsconfig.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"module": "commonjs",
|
|
4
|
-
"target": "
|
|
4
|
+
"target": "es2018",
|
|
5
5
|
"sourceMap": true,
|
|
6
6
|
"noImplicitAny": true,
|
|
7
7
|
"removeComments": false,
|
|
8
8
|
"moduleResolution": "node"
|
|
9
9
|
},
|
|
10
10
|
"exclude": [
|
|
11
|
-
"source",
|
|
12
11
|
"node_modules",
|
|
13
12
|
"dist"
|
|
14
13
|
]
|