Comparing version 1.0.2 to 2.0.0
@@ -36,3 +36,3 @@ # Contributing to Wink | ||
### Linting | ||
Well defined linting rules helps us in making code more consistent and avoid bugs. [ESLint](https://eslint.org) and [JSHint](http://jshint.com/) enforces these rules via their configuration files. These files are in the root of each repository. | ||
Well defined linting rules helps us in making code more consistent and avoid bugs. [ESLint](https://eslint.org) enforces these rules via its configuration file. This file is located in the root of each repository. | ||
@@ -39,0 +39,0 @@ |
{ | ||
"name": "wink-ner", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"description": "Language agnostic named entity recognizer", | ||
@@ -13,8 +13,7 @@ "keywords": [ | ||
"scripts": { | ||
"pretest": "npm run lint && npm run hint && npm run docs", | ||
"pretest": "npm run lint && npm run docs", | ||
"test": "istanbul cover _mocha ./test/", | ||
"coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", | ||
"sourcedocs": "docker -i src -o ./sourcedocs --sidebar no", | ||
"docs": "documentation build src/wink-ner.js -f html -o docs -c docs-toc.yml", | ||
"hint": "jshint ./src/*.js ./test/*.js ./runkit/*.js", | ||
"docs": "jsdoc src/*.js -c .jsdoc.json", | ||
"lint": "eslint ./src/*.js ./test/*.js ./runkit/*.js" | ||
@@ -27,3 +26,3 @@ }, | ||
"author": "Sanjaya Kumar Saxena", | ||
"license": "AGPL-3.0", | ||
"license": "MIT", | ||
"bugs": { | ||
@@ -34,18 +33,18 @@ "url": "https://github.com/winkjs/wink-ner/issues" | ||
"devDependencies": { | ||
"chai": "^4.1.2", | ||
"chai": "^4.2.0", | ||
"coveralls": "^3.0.2", | ||
"docdash": "^1.0.0", | ||
"docker": "^1.0.0", | ||
"documentation": "^8.1.2", | ||
"eslint": "^5.6.0", | ||
"eslint": "^5.8.0", | ||
"istanbul": "^1.1.0-alpha.1", | ||
"jshint": "^2.9.6", | ||
"jsdoc": "^3.5.5", | ||
"mocha": "^5.2.0", | ||
"mocha-lcov-reporter": "^1.3.0", | ||
"wink-tokenizer": "^4.1.0" | ||
"mocha-lcov-reporter": "^1.3.0" | ||
}, | ||
"runkitExampleFilename": "./runkit/example.js", | ||
"dependencies": { | ||
"wink-helpers": "^1.5.0", | ||
"wink-lemmatizer": "^2.0.0" | ||
"wink-helpers": "^2.0.0", | ||
"wink-lemmatizer": "^3.0.1", | ||
"wink-tokenizer": "^5.0.0" | ||
} | ||
} |
@@ -9,3 +9,3 @@ # wink-ner | ||
Recognize named entities in a sentence using **`wink-ner`**. It is a part of [wink](http://winkjs.org/) — a growing family of high quality packages for Statistical Analysis, Natural Language Processing and Machine Learning in NodeJS. | ||
Recognize named entities in a sentence using **`wink-ner`**. It is a smart Gazetteer-based Named Entity Recognizer (NER), which can be easily trained to suite specific needs. For example, the wink-ner can differentiate between `Manchester United` & `Manchester` in a single sentence and tag them as a club and city respectively. | ||
@@ -19,3 +19,3 @@ ### Installation | ||
### Getting Started | ||
#### Simple Named Entity Recognition | ||
#### Named Entity Recognition | ||
```javascript | ||
@@ -61,9 +61,5 @@ // Load wink ner. | ||
#### Integration with POS Tagging | ||
The `tokens` returned from `recognize()` may be further passed down to | ||
`tag()` api of [**`wink-pos-tagger`**](https://www.npmjs.com/package/wink-pos-tagger) for pos tagging. | ||
The `tokens` returned from `recognize()` may be further passed down to `tag()` api of [**`wink-pos-tagger`**](https://www.npmjs.com/package/wink-pos-tagger) for pos tagging. | ||
Just in case you need to assign | ||
a specific pos tag to an entity, the same can be achieved by including a property | ||
`pos` in the entity definition and assigning it the desired pos tag (e.g. `'NNP'`); the wink-pos-tagger | ||
will automatically do the needful. For details please refer to [`learn()`](#learn) api of wink-ner. | ||
Just in case you need to assign a specific pos tag to an entity, the same can be achieved by including a property `pos` in the entity definition and assigning it the desired pos tag (e.g. `'NNP'`); the wink-pos-tagger will automatically do the needful. For details please refer to [`learn()`](#learn) api of wink-ner. | ||
@@ -101,2 +97,5 @@ ```javascript | ||
### About wink | ||
[Wink](http://winkjs.org/) is a family of open source packages for **Statistical Analysis**, **Natural Language Processing** and **Machine Learning** in NodeJS. The code is **thoroughly documented** for easy human comprehension and has a **test coverage of ~100%** for reliability to build production grade solutions. | ||
### Copyright & License | ||
@@ -106,3 +105,2 @@ | ||
It is licensed under the under the terms of the GNU Affero General Public License as published by the Free | ||
Software Foundation, version 3 of the License. | ||
It is licensed under the terms of the MIT License. |
@@ -8,16 +8,19 @@ // wink-ner | ||
// | ||
// “wink-ner” is free software: you can redistribute it | ||
// and/or modify it under the terms of the GNU Affero | ||
// General Public License as published by the Free | ||
// Software Foundation, version 3 of the License. | ||
// Permission is hereby granted, free of charge, to any person obtaining a | ||
// copy of this software and associated documentation files (the "Software"), | ||
// to deal in the Software without restriction, including without limitation | ||
// the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
// and/or sell copies of the Software, and to permit persons to whom the | ||
// Software is furnished to do so, subject to the following conditions: | ||
// | ||
// “wink-ner” is distributed in the hope that it will | ||
// be useful, but WITHOUT ANY WARRANTY; without even | ||
// the implied warranty of MERCHANTABILITY or FITNESS | ||
// FOR A PARTICULAR PURPOSE. See the GNU Affero General | ||
// Public License for more details. | ||
// The above copyright notice and this permission notice shall be included | ||
// in all copies or substantial portions of the Software. | ||
// | ||
// You should have received a copy of the GNU Affero | ||
// General Public License along with “wink-ner”. | ||
// If not, see <http://www.gnu.org/licenses/>. | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
// DEALINGS IN THE SOFTWARE. | ||
@@ -31,5 +34,5 @@ // | ||
* | ||
* Creates an instance of **`wink-ner`**. | ||
* Creates an instance of {@link NER}. | ||
* | ||
* @return {methods} object conatining set of API methods for named entity | ||
* @return {NER} object conatining set of API methods for named entity | ||
* training, recognition, etc. | ||
@@ -43,3 +46,8 @@ * @example | ||
var ner = function () { | ||
// Returned! | ||
/** | ||
* @classdesc NER class | ||
* @class NER | ||
* @hideconstructor | ||
*/ | ||
var methods = Object.create( null ); | ||
@@ -75,2 +83,3 @@ // Configuration - what tags or values to ignore during recognition phase. | ||
* | ||
* @method NER#defineConfig | ||
* @param {object} config — defines the `values` and/or `tags` to be ignore | ||
@@ -184,2 +193,3 @@ * during entity detection. Note if the match occurs in any one of the array, | ||
* | ||
* @method NER#cloneEntity | ||
* @param {object} e — to be cloned. | ||
@@ -203,2 +213,3 @@ * @return {object} the clone. | ||
* | ||
* @method NER#copyKVPs | ||
* @param {object} target — to which key/value pairs from source are copied. | ||
@@ -222,2 +233,3 @@ * @param {object} source — of key/value pairs. | ||
* | ||
* @method NER#normalize | ||
* @param {string} value — to be normalized. | ||
@@ -240,2 +252,3 @@ * @return {string} normalized `value.` | ||
* | ||
* @method NER#addUniWordEntity | ||
* @param {string[]} words — from entity's text. | ||
@@ -260,2 +273,3 @@ * @param {object} entity — to be added. | ||
* | ||
* @method NER#addMultiWordEntity | ||
* @param {string} text — property of entity. | ||
@@ -295,2 +309,3 @@ * @param {string[]} words — from entity's text. | ||
* | ||
* @method NER#learn | ||
* @param {object[]} entities — where each element defines an entity via | ||
@@ -370,2 +385,3 @@ * two mandatory properties viz. `text` and `entityType` as described later. | ||
* | ||
* @method NER#isIgnorable | ||
* @param {string} value — to be tested. | ||
@@ -448,6 +464,7 @@ * @param {string} tag — to be tested. | ||
/** | ||
* @private | ||
* Exports the JSON of the learnings generated by `learn()`, which may be | ||
* saved in a file that may be used later for NER purpose. | ||
* | ||
* @method NER#lookup | ||
* @private | ||
* @param {number} i — index of tokens, from where the lookup is performed. | ||
@@ -484,2 +501,3 @@ * @param {object[]} tokens — input tokens to NER. | ||
* | ||
* @method NER#recognize | ||
* @param {object[]} tokens — tokenized either using | ||
@@ -581,5 +599,6 @@ * [wink-tokenizer](https://www.npmjs.com/package/wink-tokenizer) or follow | ||
/** | ||
* @private | ||
* Initalizes the config and learning related variables. | ||
* | ||
* @method NER#initialize | ||
* @private | ||
* @return {undefined} of the learnings. | ||
@@ -607,2 +626,3 @@ */ | ||
* | ||
* @method NER#reset | ||
* @return {boolean} always true. | ||
@@ -624,2 +644,3 @@ * @example | ||
* | ||
* @method NER#exportJSON | ||
* @return {json} of the learnings. | ||
@@ -648,2 +669,3 @@ * @example | ||
* | ||
* @method NER#importJSON | ||
* @param {json} json — containg an earlier exported learnings in JSON format. | ||
@@ -650,0 +672,0 @@ * @return {boolean} always `true`. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
9
0
100
700
45109
3
102
+ Addedwink-tokenizer@^5.0.0
+ Addedemoji-regex@9.2.2(transitive)
+ Addedwink-helpers@2.0.0(transitive)
+ Addedwink-lemmatizer@3.0.4(transitive)
+ Addedwink-lexicon@2.2.0(transitive)
+ Addedwink-porter2-stemmer@2.0.1(transitive)
+ Addedwink-tokenizer@5.3.0(transitive)
- Removedwink-helpers@1.5.0(transitive)
- Removedwink-lemmatizer@2.0.0(transitive)
- Removedwink-lexicon@1.9.0(transitive)
- Removedwink-porter2-stemmer@1.0.8(transitive)
Updatedwink-helpers@^2.0.0
Updatedwink-lemmatizer@^3.0.1