Socket
Socket
Sign inDemoInstall

compromise

Package Overview
Dependencies
Maintainers
3
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 13.9.3 to 13.10.0

8

changelog.md

@@ -12,5 +12,11 @@ compromise uses semver, and pushes to npm frequently

<!-- #### [Unreleased]
- **[new]** - #Fraction tag and improved fraction support (thanks Jakeii!)
-->
#### 13.10.0 [Feb 2021]
- **[new]** - #Fraction tag and improved fraction support (thanks Jakeii!)
- **[fix]** - edge-case match issues with `!` syntax
- **[change]** - update deps
- updates for `compromise-dates@1.4.0`, `compromise-numbers@1.2.0`
#### 13.9.3 [Feb 2021]

@@ -17,0 +23,0 @@ - **[fix]** - fix weird ordering issue with named exports #815

14

package.json

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

"description": "modest natural language processing",
"version": "13.9.3",
"version": "13.10.0",
"main": "./builds/compromise.js",

@@ -73,13 +73,13 @@ "unpkg": "./builds/compromise.min.js",

"devDependencies": {
"@babel/core": "7.12.13",
"@babel/preset-env": "7.12.13",
"@babel/core": "7.12.17",
"@babel/preset-env": "7.12.17",
"@rollup/plugin-alias": "3.1.2",
"@rollup/plugin-commonjs": "17.1.0",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "11.1.1",
"amble": "1.2.0",
"@rollup/plugin-node-resolve": "11.2.0",
"amble": "1.3.0",
"codecov": "3.8.1",
"efrt": "2.2.2",
"nyc": "^15.1.0",
"rollup": "2.38.4",
"rollup": "2.39.0",
"rollup-plugin-babel": "4.4.0",

@@ -90,3 +90,3 @@ "rollup-plugin-filesize-check": "0.0.1",

"tap-dancer": "0.3.1",
"tape": "5.1.1"
"tape": "5.2.0"
},

@@ -93,0 +93,0 @@ "eslintIgnore": [

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

<a href="https://docs.compromise.cool/compromise-performance">quick</a>,
and <a href="https://docs.compromise.cool/compromise-accuracy">usually good-enough</a>.
and often <a href="https://docs.compromise.cool/compromise-accuracy">good-enough</a>.
</div>

@@ -59,14 +59,13 @@

compromise makes it simple to interpret and match text:
interpret and match text:
```js
let doc = nlp(entireNovel)
doc.if('the #Adjective of times').text()
// "it was the blurst of times??"
doc.match('the #Adjective of times').text()
// "the blurst of times?"
```
```js
if (doc.has('simon says #Verb')) {
return true
if (doc.has('simon says #Verb') === false) {
return null
}

@@ -120,3 +119,3 @@ ```

interpret plaintext numbers
interpret plain-text numbers

@@ -141,3 +140,3 @@ ```js

grab subjects in a text:
grab the big subjects:

@@ -171,3 +170,3 @@ ```js

work with contracted and implicit words:
handle implicit words:

@@ -210,3 +209,3 @@ ```js

or as an es-module:
as an es-module:

@@ -241,3 +240,3 @@ ```typescript

it works mainly by <a href="https://observablehq.com/@spencermountain/verbs">conjugating many forms</a> of a basic word list.
it works mainly by <a href="https://observablehq.com/@spencermountain/verbs">conjugating all forms</a> of a basic word list.

@@ -250,3 +249,3 @@ The final lexicon is <a href="https://observablehq.com/@spencermountain/compromise-lexicon">~14,000 words</a>:

you can read more about how it works, [here](https://observablehq.com/@spencermountain/compromise-internals).
you can read more about how it works, [here](https://observablehq.com/@spencermountain/compromise-internals). it's weird.

@@ -261,3 +260,3 @@ <!-- spacer -->

set a custom interpretation of your own words:
decide how words get interpreted:

@@ -272,3 +271,3 @@ ```js

or make more changes with a [compromise-plugin](https://observablehq.com/@spencermountain/compromise-plugins).
or make heavier changes with a [compromise-plugin](https://observablehq.com/@spencermountain/compromise-plugins).

@@ -322,7 +321,7 @@ ```js

##### Warm introduction:
##### gentle introduction:
- **[#1 Input → output](https://docs.compromise.cool/tutorial-1)**
- **[#2 Match & transform](https://docs.compromise.cool/compromise-tutorial-2)**
- **[#3 Making a chat-bot](https://docs.compromise.cool/compromise-making-a-bot)**
- **[#1) Input → output](https://docs.compromise.cool/tutorial-1)**
- **[#2) Match & transform](https://docs.compromise.cool/compromise-tutorial-2)**
- **[#3) Making a chat-bot](https://docs.compromise.cool/compromise-making-a-bot)**
<!-- * **[Tutorial #4]()** - Making a plugin -->

@@ -353,3 +352,3 @@

| [Whitespace](https://observablehq.com/@spencermountain/compromise-whitespace) | [Verbs](https://observablehq.com/@spencermountain/verbs) | [Penn-tags](https://observablehq.com/@spencermountain/compromise-penn-tags)
| [World](https://observablehq.com/@spencermountain/compromise-world) | [Normalization](https://observablehq.com/@spencermountain/compromise/Normalization) |
| [World data](https://observablehq.com/@spencermountain/compromise-world) | [Normalization](https://observablehq.com/@spencermountain/compromise/Normalization) |
| [Fuzzy-matching](https://observablehq.com/@spencermountain/compromise-fuzzy-matching) |[Typescript](https://observablehq.com/@spencermountain/compromise-typescript) |

@@ -599,2 +598,3 @@

- **[.dates()](https://observablehq.com/@spencermountain/compromise-dates)** - find dates like `June 8th` or `03/03/18`
- **[.dates().get()](https://observablehq.com/@spencermountain/compromise-dates)** - simple start/end json result
- **[.dates().json()](https://observablehq.com/@spencermountain/compromise-dates)** - overloaded output with date metadata

@@ -604,2 +604,8 @@ - **[.dates().format('')](https://observablehq.com/@spencermountain/compromise-dates)** - convert the dates to specific formats

- **[.dates().toLongForm()](https://observablehq.com/@spencermountain/compromise-dates)** - convert 'Feb' to 'February', etc
- **[.durations()](https://observablehq.com/@spencermountain/compromise-dates)** - `2 weeks` or `5mins`
- **[.durations().get()](https://observablehq.com/@spencermountain/compromise-dates)** - return simple json for duration
- **[.durations().json()](https://observablehq.com/@spencermountain/compromise-dates)** - overloaded output with duration metadata
- **[.times()](https://observablehq.com/@spencermountain/compromise-dates)** - `4:30pm` or `half past five`
- **[.durations().get()](https://observablehq.com/@spencermountain/compromise-dates)** - return simple json for times
- **[.times().json()](https://observablehq.com/@spencermountain/compromise-dates)** - overloaded output with time metadata

@@ -611,4 +617,4 @@ ##### Numbers

- **[.numbers()](https://observablehq.com/@spencermountain/compromise-values)** - grab all written and numeric values
- **[.numbers().get()](https://observablehq.com/@spencermountain/compromise-values)** - retrieve the parsed number(s)
- **[.numbers().json()](https://observablehq.com/@spencermountain/compromise-values)** - overloaded output with number metadata
- **[.numbers().get()](https://observablehq.com/@spencermountain/compromise-values)** - retrieve the parsed number(s)
- **[.numbers().units()](https://observablehq.com/@spencermountain/compromise-values)** - grab 'kilos' from `25 kilos'`

@@ -636,4 +642,13 @@ - **[.numbers().fractions()](https://observablehq.com/@spencermountain/compromise-values)** - things like `1/3rd`

- **[.money().currency()](https://observablehq.com/@spencermountain/compromise-values)** - which currency the money is in
- **[.fractions()](https://observablehq.com/@spencermountain/compromise-values)** - like '2/3rds'
- **[.fractions()](https://observablehq.com/@spencermountain/compromise-values)** - like '2/3rds' or 'one out of five'
- **[.fractions().get()](https://observablehq.com/@spencermountain/compromise-values)** - simple numerator, denomenator data
- **[.fractions().json()](https://observablehq.com/@spencermountain/compromise-values)** - json method overloaded with fractions data
- **[.fractions().toDecimal()](https://observablehq.com/@spencermountain/compromise-values)** - '2/3' -> '0.66'
- **[.fractions().normalize()](https://observablehq.com/@spencermountain/compromise-values)** - 'four out of 10' -> '4/10'
- **[.fractions().toText()](https://observablehq.com/@spencermountain/compromise-values)** - '4/10' -> 'four tenths'
- **[.fractions().toPercentage()](https://observablehq.com/@spencermountain/compromise-values)** - '4/10' -> '40%'
- **[.percentages()](https://observablehq.com/@spencermountain/compromise-values)** - like '2.5%'
- **[.fractions().get()](https://observablehq.com/@spencermountain/compromise-values)** - return the percentage number / 100
- **[.fractions().json()](https://observablehq.com/@spencermountain/compromise-values)** - json overloaded with percentage information
- **[.fractions().toFraction()](https://observablehq.com/@spencermountain/compromise-values)** - '80%' -> '8/10'

@@ -745,3 +760,2 @@ ##### Export

<hr/>
<img height="25px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
</div>

@@ -780,3 +794,3 @@

//but the whole api still works
//the rest of the api still works
console.log(doc.has('my .* is .? named /^b[oa]rt/')) //true

@@ -881,3 +895,3 @@ </script>

- &nbsp; **[en-pos](https://github.com/finnlp/en-pos)** - very-clever javascript pos-tagger by *[Alex Corvi](https://github.com/alexcorvi)*
- &nbsp; **[en-pos](https://github.com/finnlp/en-pos)** - very clever javascript pos-tagger *by [Alex Corvi](https://github.com/alexcorvi)*
- &nbsp; **[naturalNode](https://github.com/NaturalNode/natural)** - fancier statistical nlp in javascript

@@ -884,0 +898,0 @@ - &nbsp; **[compendium-js](https://github.com/Ulflander/compendium-js)** - POS and sentiment analysis in javascript

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 not supported yet

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