Comparing version 0.2.1 to 0.2.2
@@ -20,3 +20,3 @@ { | ||
], | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"licenses": [ | ||
@@ -23,0 +23,0 @@ { |
@@ -20,16 +20,24 @@ ABOUT: | ||
npm install pos | ||
`$ npm install pos` | ||
USAGE: | ||
var pos = require('pos'); | ||
var words = new pos.Lexer().lex("This is some sample text. This text can contain multiple sentences."); | ||
var taggedWords = new pos.Tagger().tag(words); | ||
for (i in taggedWords) { | ||
var taggedWord = taggedWords[i]; | ||
var word = taggedWord[0]; | ||
var tag = taggedWord[1]; | ||
console.log(word + " /" + tag); | ||
} | ||
```javascript | ||
var pos = require('pos'); | ||
var words = new pos.Lexer().lex('This is some sample text. This text can contain multiple sentences.'); | ||
var tagger = new pos.Tagger(); | ||
var taggedWords = tagger.tag(words); | ||
for (i in taggedWords) { | ||
var taggedWord = taggedWords[i]; | ||
var word = taggedWord[0]; | ||
var tag = taggedWord[1]; | ||
console.log(word + " /" + tag); | ||
} | ||
// extend the lexicon | ||
tagger.extendLexicon({'Obama': ['NNP']}); | ||
tagger.tag(['Mr', 'Obama']); | ||
// --> [[ 'Mr', 'NNP' ], [ 'Obama', 'NNP' ]] | ||
``` | ||
ACKNOWLEDGEMENTS: | ||
@@ -36,0 +44,0 @@ |
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
4038581
92