Socket
Socket
Sign inDemoInstall

compromise

Package Overview
Dependencies
Maintainers
2
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compromise - npm Package Compare versions

Comparing version 11.9.0 to 11.9.1

270

changelog.md

@@ -10,24 +10,16 @@ compromise uses semver, and pushes to npm frequently

### v11
##### 11.1.0
- add `#Multiple` Values tag, and changes to how invalid numbers like 'sixty fifteen hundred' are understood
- better em-dash/en-dash support
- better conjugate implicit verbs inside contractions - "i'm", "we've"
- nouns().articles() method
- neighborhoods as #Place
- support more complex noun-phrases with JustesonKatz in `.nouns()`
<!-- * include 'the #TitleCase' matches in .topics() -->
##### 11.2.1
- rolls-back some aggressive JustesonKatz stuff
- better support for emdash numberRange
- 'can\'t' contraction bugfix
- fix for dates().toShortForm()
##### 11.3.1
- almost-double the support for first-names
- changes to bestTag method
##### 11.4.1
- include old ending punctuation in a `.replace()` cmd
##### 11.5.0
- add #Abbreviation tag
- add #ProperNoun tag
- fixes for noun inflection
##### 11.9.0
- tag professions as `#Actor`
- add more behaviours to `.normalize()`
- support match-results as inputs to .match() and .not()
- support some us-state abbreviations like 'Phoeniz AZ'
##### 11.8.0
- add `nouns().toPossessive()`
- ngrams now remove empty-terms in contractions - fixes counting issue [#476](https://github.com/spencermountain/compromise/issues/476)
##### 11.7.0
- expose internal `sentences().isQuestion()` method
- `.join()` as an alias for `.flatten()`
- slightly different behavior for wildcards in capture-groups [pull/472](https://github.com/spencermountain/compromise/pull/472)
- `.possessives()` subset + `#Possessive` tagging fixes
- hide massive `world` output for console.log of a term
##### 11.6.0

@@ -44,17 +36,26 @@ - improve quotations() method

- more consistent `cardinal/ordinal` tagging for values
##### 11.7.0
- expose internal `sentences().isQuestion()` method
- `.join()` as an alias for `.flatten()`
- slightly different behavior for wildcards in capture-groups [pull/472](https://github.com/spencermountain/compromise/pull/472)
- `.possessives()` subset + `#Possessive` tagging fixes
- hide massive `world` output for console.log of a term
##### 11.8.0
- add `nouns().toPossessive()`
- ngrams now remove empty-terms in contractions - fixes counting issue [#476](https://github.com/spencermountain/compromise/issues/476)
##### 11.9.0
- tag professions as `#Actor`
- add more behaviours to `.normalize()`
- support match-results as inputs to .match() and .not()
- support some us-state abbreviations like 'Phoeniz AZ'
##### 11.5.0
- add #Abbreviation tag
- add #ProperNoun tag
- fixes for noun inflection
##### 11.4.1
- include old ending punctuation in a `.replace()` cmd
##### 11.3.1
- almost-double the support for first-names
- changes to bestTag method
##### 11.2.1
- rolls-back some aggressive JustesonKatz stuff
- better support for emdash numberRange
- 'can\'t' contraction bugfix
- fix for dates().toShortForm()
##### 11.1.0
- add `#Multiple` Values tag, and changes to how invalid numbers like 'sixty fifteen hundred' are understood
- better em-dash/en-dash support
- better conjugate implicit verbs inside contractions - "i'm", "we've"
- nouns().articles() method
- neighborhoods as #Place
- support more complex noun-phrases with JustesonKatz in `.nouns()`
<!-- * include 'the #TitleCase' matches in .topics() -->
##### 11.0.0

@@ -80,2 +81,34 @@ - support for persistent lexicon/tagset changes

### v10
##### 10.7.2
- fix for '.watch' reserved word in efrt
##### 10.7.0
- improved `places()` parsing
- improved `{min,max}` match syntax
- new `.out('match')` method
- quiet addition of .pack() and .unpack() for owen
##### 10.6.0
- move internal lexicon around, to support new format in v11
- added states & provinces as #Region
- added #Comparable tag for adjectives that conjugate
##### 10.5.0
- add increment/decrement/add/subtract methods to .values()
- add units(), noUnits() methods to .values()
- 'uncountable' nouns are no longer assumed to be singular
- money tag is no longer always a value
##### 10.4.0
- improved tagging of `VerbPhrase` and `Condition`
- fixes to contractions in sentence-changes - "i'm going -> i went"
- several verb conjugation fixes
- accept Terms & Result objects in .match() and .replace()
##### 10.3.0
- new `Percent` tag
- lump more units in with `.values()`
##### 10.2.0
- .trim() method,
- adjective tagging fixes
- some new .out() methods
##### 10.1.0
- fix return format of .isPlural(), so it acts like a match filter
- less-greedy date tagging & ambiguous month fixes
##### 10.0.0
- cleanup & rename some `.value()` methods

@@ -93,35 +126,6 @@ - change lumping behaviour of lexicon terms with multiple words

- improved .debug() and logging on client-side
##### 10.1.0
- fix return format of .isPlural(), so it acts like a match filter
- less-greedy date tagging & ambiguous month fixes
##### 10.2.0
- .trim() method,
- adjective tagging fixes
- some new .out() methods
##### 10.3.0
- new `Percent` tag
- lump more units in with `.values()`
##### 10.4.0
- improved tagging of `VerbPhrase` and `Condition`
- fixes to contractions in sentence-changes - "i'm going -> i went"
- several verb conjugation fixes
- accept Terms & Result objects in .match() and .replace()
##### 10.5.0
- add increment/decrement/add/subtract methods to .values()
- add units(), noUnits() methods to .values()
- 'uncountable' nouns are no longer assumed to be singular
- money tag is no longer always a value
##### 10.6.0
- move internal lexicon around, to support new format in v11
- added states & provinces as #Region
- added #Comparable tag for adjectives that conjugate
##### 10.7.0
- improved `places()` parsing
- improved `{min,max}` match syntax
- new `.out('match')` method
- quiet addition of .pack() and .unpack() for owen
##### 10.7.2
- fix for '.watch' reserved word in efrt
### v9 &nbsp;
##### 9.1.0
- pretty-real filesize reduction by swapping es6 classes for es5 inheritance
##### 9.0.0

@@ -134,80 +138,96 @@ - rename `Term.tag` object to `Term.tags` so the `.tag()` method can work throughout more-consistently

- new `.has()` method for faster lookups
##### 9.1.0
- pretty-real filesize reduction by swapping es6 classes for es5 inheritance
### v8 &nbsp;
##### 8.2.0
- add `nlp.out('index')` method, 12 bugs
##### 8.1.0
- add `nlp.tokenize()` method for disabling pos-tagging of input
##### 8.0.0
- less-ambitious date-parsing of nl-date forms
- filesize reduction using [efrt](https://github.com/nlp-compromise/efrt) data structure (254k -> 214k)
- 8.1.0 - add `nlp.tokenize()` method for disabling pos-tagging of input
- 8.2.0 - add `nlp.out('index')` method, 12 bugs
### v7 &nbsp; :postal_horn:
* 7.0.0 - weee! [big change!](https://github.com/nlp-compromise/compromise/wiki/v7-Upgrade,-welcome) *npm package rename*
* 7.0.15 - fix for IE9
##### 7.0.15
- fix for IE9
##### 7.0.0
- weee! [big change!](https://github.com/nlp-compromise/compromise/wiki/v7-Upgrade,-welcome) *npm package rename*
### v6 &nbsp;
* 6.5.0 - builds now using browserify + derequire()
* 6.4.0 - re-written term-lumper logic
* 6.3.0 - new nlp.lexicon({word:'POS'}) flow
* 6.0.0 - be consistent with `text.normal()`, `term.all_forms()`, `text.word_count()`. `text.normal()` includes sentence-terminators, like periods etc.
##### 6.5.0
- builds now using browserify + derequire()
##### 6.4.0
- re-written term-lumper logic
##### 6.3.0
- new nlp.lexicon({word:'POS'}) flow
##### 6.0.0
- be consistent with `text.normal()`, `term.all_forms()`, `text.word_count()`. `text.normal()` includes sentence-terminators, like periods etc.
### v5 &nbsp;
* 5.2.0 - airport codes support, helper methods for specific POS
* 5.1.0 - newlines split sentences
* 5.0.0 - Text methods now return this, instead of array of sentences
##### 5.2.0
- airport codes support, helper methods for specific POS
##### 5.1.0
- newlines split sentences
##### 5.0.0
- Text methods now return this, instead of array of sentences
### v4 &nbsp;
* 4.12.0 - more-sensible responses for invalid, non-string inputs
* 4.11.0 - 14 PRs, with fixes for currencies, pluralization, conjugation
* 4.10.0 - Value.to_text() new method, fix "Posessive" POS typo
* 4.9.0 - return of the text.spot() method (Re:#107)
* 4.8.0 - more aggressive lumping of dates, like 'last week of february'
* 4.7.0 - whitespace reproduction in .text() methods
* 4.6.0 - move negate from sentence to verb & statement
* 4.2.0 - rename 'implicit' to 'expansion' for smarter contractions
* 4.1.3 - added readable-compression to adj, verbs (121kb -> 117kb)
* 4.1.0 - hyphenated words are normalized into spaces
* 4.0.0 - grammar-aware match & replace functions
##### 4.12.0
- more-sensible responses for invalid, non-string inputs
##### 4.11.0
- 14 PRs, with fixes for currencies, pluralization, conjugation
##### 4.10.0
- Value.to_text() new method, fix "Posessive" POS typo
##### 4.9.0
- return of the text.spot() method (Re:#107)
##### 4.8.0
- more aggressive lumping of dates, like 'last week of february'
##### 4.7.0
- whitespace reproduction in .text() methods
##### 4.6.0
- move negate from sentence to verb & statement
##### 4.2.0
- rename 'implicit' to 'expansion' for smarter contractions
##### 4.1.3
- added readable-compression to adj, verbs (121kb -> 117kb)
##### 4.1.0
- hyphenated words are normalized into spaces
##### 4.0.0
- grammar-aware match & replace functions
### v3 &nbsp; **(Breaking)**
* 3.0.2 - Statement & Question classes
* v3.0.0 - Feb 2016
* split ngram, locale, and syllables into plugins in seperate repo
##### 3.0.2
- Statement & Question classes
##### 3.0.0 - Feb 2016
- split ngram, locale, and syllables into plugins in seperate repo
### v2
* v2.0.0 - Nov 2015 &nbsp; **(Breaking)**
* es6 classes, babel building
* better test coverage
* ngram uses term tokenization, so that 'Tony Hawk' us one term, and not two
* more organized pos rules
* Pos tagging is done implicitly now once nlp.Text is run
* Entity spotting is split into .people(), .place(), .organisations()
* unicode normalisation is killed
* opaque two-letter tags are gone
* plugin support
* passive tense detection
* lexicon can be augmented third-party
* date parsing results are different
##### 2.0.0 - Nov 2015 &nbsp; **(Breaking)**
- es6 classes, babel building
- better test coverage
- ngram uses term tokenization, so that 'Tony Hawk' us one term, and not two
- more organized pos rules
- Pos tagging is done implicitly now once nlp.Text is run
- Entity spotting is split into .people(), .place(), .organisations()
- unicode normalisation is killed
- opaque two-letter tags are gone
- plugin support
- passive tense detection
- lexicon can be augmented third-party
- date parsing results are different
### v1
* v1.1.0 - May 2015
smarter handling of ambiguous contractions ("he's" -> ["he is", "he has"])
##### 1.1.0 - May 2015
- smarter handling of ambiguous contractions ("he's" -> ["he is", "he has"])
##### 1.0.0 - May 2015
- added name genders and beginning of co-reference resolution ('Tony' -> 'he') API.
- small breaking change on ```Noun.is_plural``` and ```Noun.is_entity```, affording significant pos() speedup. Bumped Major version for these changes.
* v1.0.0 - May 2015
added name genders and beginning of co-reference resolution ('Tony' -> 'he') API.
small breaking change on ```Noun.is_plural``` and ```Noun.is_entity```, affording significant pos() speedup. Bumped Major version for these changes.
### v0
* v0.5.2 - May 2015
Phrasal verbs ('step up'), firstnames and .people()
* v0.4.0 - May 2015
Major file-size reduction through refactoring
* v0.3.0 - Jan 2015
New NER choosing algorithm, better capitalisation logic, consolidated tests
* v0.2.0 - Nov 2014
Sentence class methods, client-side demos
##### 0.5.2 - May 2015
- Phrasal verbs ('step up'), firstnames and .people()
##### 0.4.0 - May 2015
- Major file-size reduction through refactoring
##### 0.3.0 - Jan 2015
- New NER choosing algorithm, better capitalisation logic, consolidated tests
##### 0.2.0 - Nov 2014
- Sentence class methods, client-side demos

@@ -57,3 +57,3 @@ {

"returns": "Text",
"example": "nlp('Larry, Curly, and Moe').people().map((m,i)=> i + m.out() )\n//0curly\n//1larry\n//2moe"
"example": "nlp('Larry, Curly, and Moe').people().forEach((m,i)=> console.log(m.out()) )\n//curly\n//larry\n//moe"
},

@@ -60,0 +60,0 @@ "map": {

@@ -5,3 +5,3 @@ {

"description": "natural language processing in the browser",
"version": "11.9.0",
"version": "11.9.1",
"main": "./builds/compromise.js",

@@ -26,3 +26,3 @@ "types": "./compromise.d.ts",

"watch": "amble ./scratch.js",
"filesize": "node ./scripts/filesize.js",
"filesize": "node ./scripts/lib/filesize.js",
"coverage": "node ./scripts/postpublish/coverage.js",

@@ -41,3 +41,3 @@ "lint": "node ./scripts/prepublish/linter.js"

"amble": "0.0.6",
"babel-preset-es2015": "6.24.1",
"babel-preset-env": "^1.7.0",
"babelify": "7.3.0",

@@ -50,9 +50,9 @@ "babili": "0.1.4",

"eslint": "4.19.1",
"nyc": "11.7.1",
"nyc": "11.8.0",
"shelljs": "0.8.2",
"tap-dancer": "0.0.3",
"tape": "4.9.0",
"uglify-js": "2.7.0"
"uglify-js": "3.3.26"
},
"license": "MIT"
}

@@ -69,3 +69,3 @@ <div align="center">

<a href="https://beta.observablehq.com/@spencermountain/compromise-filesize">small,
<a href="https://beta.observablehq.com/@spencermountain/compromise-performance">quick</a>,
<a href="https://beta.observablehq.com/@spencermountain/compromise-performance">quick</a>,
and <a href="https://beta.observablehq.com/@spencermountain/compromise-accuracy">good-enough</a> for a bunch of stuff.

@@ -97,3 +97,3 @@ </div>

<b>
<a href="https://github.com/spencermountain/compromise/wiki/Accuracy">
<a href="https://beta.observablehq.com/@spencermountain/compromise-accuracy">
86%

@@ -138,2 +138,74 @@ </a>

<div align="center">
Get the hang of things:
</div>
<table align="center">
<tr>
<td>
<div align="center">
<a href="https://beta.observablehq.com/@spencermountain/tutorial-1">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Tutorial #1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</a>
</div>
<div align="center">
<sub>Input โ†’ output</sub>
</div>
</td>
<td>
<div align="center">
<a href="https://beta.observablehq.com/@spencermountain/compromise-tutorial-2">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Tutorial #2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</a>
</div>
<div align="center">
<sub>Match & transform</sub>
</div>
</td>
<td>
<div align="center">
<a href="https://beta.observablehq.com/@spencermountain/compromise-making-a-bot">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Tutorial #3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</a>
</div>
<div align="center">
<sub>Making a bot</sub>
</div>
</td>
</tr>
</table>
<div align="center">
Detailed docs:
</div>
<table align="center">
<tr>
<td>
<div align="center">
<a href="https://beta.observablehq.com/@spencermountain/compromise-api">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; API &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</a>
</div>
</td>
<td>
<div align="center">
<a href="https://beta.observablehq.com/@spencermountain/compromise-tags">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Full Tagset &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</a>
</div>
</td>
<td>
<div align="center">
<a href="https://beta.observablehq.com/@spencermountain/compromise-plugins">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Plugins &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</a>
</div>
</td>
</tr>
</table>
## Examples:
<table>

@@ -163,3 +235,3 @@ <tr>

<div align="center">
<a href="https://nlp-expo.firebaseapp.com/expo/parse-all-the-numbers-278986">
<a href="https://beta.observablehq.com/@spencermountain/compromise-values">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Number parsing &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

@@ -177,3 +249,3 @@ </a>

<a href="https://beta.observablehq.com/@spencermountain/tutorial-1">
&nbsp; &nbsp; &nbsp; &nbsp; Template-matches &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; Grammar-match &nbsp; &nbsp; &nbsp; &nbsp;
</a>

@@ -197,3 +269,3 @@ </div>

<div align="center">
<a href="https://github.com/spencermountain/compromise/wiki/Usage">
<a href="https://beta.observablehq.com/@spencermountain/compromise-tutorial-2">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Transformations &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

@@ -209,28 +281,2 @@ </a>

<!-- plugins section -->
__**[plugins](https://beta.observablehq.com/@spencermountain/compromise-plugins)**__ allow adding vocabulary, fixing errors, and setting context quickly:
```js
var plugin = {
tags:{
Character:{
isA: 'Noun'
}
},
words:{
itchy: 'Character',
scratchy: 'Character'
}
}
nlp.plugin(plugin)
nlp(`Couldn't Itchy share his pie with Scratchy?`).debug()
/*
couldn't - #Modal, #Verb
itchy - #Character, #Noun
share - #Infinitive, #Verb
...
*/
```
## Examples:
* <a href="https://beta.observablehq.com/@spencermountain/nouns"><b>Plural/singular:</b></a> - grab the noun-phrases, make em plural:

@@ -244,3 +290,3 @@ ```js

* <a href="https://github.com/spencermountain/compromise/wiki/Values"><b>Number parsing:</b></a> - parse written-out numbers, and change their form:
* <a href="https://beta.observablehq.com/@spencermountain/compromise-values"><b>Number parsing:</b></a> - parse written-out numbers, and change their form:
```js

@@ -306,3 +352,3 @@ doc = nlp('ninety five thousand and fifty two')

* <a href="https://github.com/spencermountain/compromise/wiki/Output"><b> Handy outputs:</b></a> - get sensible data:
* <a href="https://beta.observablehq.com/@spencermountain/compromise-output"><b> Handy outputs:</b></a> - get sensible data:
```js

@@ -321,4 +367,29 @@ doc = nlp('We like Roy! We like Roy!').sentences().out('array')

```
<!-- plugins section -->
* <a href="https://beta.observablehq.com/@spencermountain/compromise-plugins"><b> Plugins:</b></a> - allow adding vocabulary, fixing errors, and setting context quickly:
```js
var plugin = {
tags:{
Character:{
isA: 'Noun'
}
},
words:{
itchy: 'Character',
scratchy: 'Character'
}
}
nlp.plugin(plugin)
nlp(`Couldn't Itchy share his pie with Scratchy?`).debug()
/*
couldn't - #Modal, #Verb
itchy - #Character, #Noun
share - #Infinitive, #Verb
...
*/
```
<h3 align="center">
of course, there's <a href="https://github.com/spencermountain/compromise/wiki">a lot more stuff</a>.
of course, there's <a href="https://beta.observablehq.com/@spencermountain/nlp-compromise">a lot more stuff</a>.
</h3>

@@ -387,3 +458,3 @@ <h4 align="center">

<br/>
See <a href="https://github.com/spencermountain/compromise/wiki/Speed">here</a> for information about speed & performance, and
See <a href="https://beta.observablehq.com/@spencermountain/compromise-performance">here</a> for information about speed & performance, and
<a href="https://github.com/spencermountain/compromise/wiki/Justification">here></a> for project motivations

@@ -390,0 +461,0 @@ </ul>

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc