Skip to content

Commit

Permalink
Merge pull request #939 from spencermountain/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
spencermountain authored Jul 27, 2022
2 parents 08f2a85 + fe8a7cc commit ddf6ec4
Show file tree
Hide file tree
Showing 36 changed files with 630 additions and 196 deletions.
53 changes: 25 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</a>
</sub>
</div>
<img height="25px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
<img height="22px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
</div>

<div align="center">
Expand All @@ -25,49 +25,45 @@
<img src="https://codecov.io/gh/spencermountain/compromise/branch/master/graph/badge.svg" />
</a>
<a href="https://bundlephobia.com/result?p=compromise">
<img src="https://badge-size.herokuapp.com/spencermountain/compromise/master/builds/compromise.min.js" />
<img src="https://img.shields.io/bundlephobia/min/compromise"/>
<!-- <img src="https://badge-size.herokuapp.com/spencermountain/compromise/master/builds/compromise.min.js" /> -->
</a>
</div>
<div align="center">
<sub>
<a href="https://github.com/nlp-compromise/fr-compromise">french</a> • <a href="https://github.com/nlp-compromise/de-compromise">german</a> • <a href="https://github.com/nlp-compromise/it-compromise">italian</a> • <a href="https://github.com/nlp-compromise/es-compromise">spanish</a>
</sub>
</div>
</div>

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


<div align="left">
do you find it strange, how we struggle to parse text?
<div align="left">
don't you find it strange,
<br/>
<ul>
<i>↬<sub>ᔐᖜ</sub>↬-</i>
<img height="2px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
<sub>how <b>easy</b> text is to <b>make</b>,</sub>
<br/>
how <b>error-prone</b> and <b><i>tricky</i></b> the simplest things are?
<div>
<img height="45px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
</div>
<sub>how easy text is to make, then how difficult it is <i>to use</i>?</sub>
</ul>
</div>
<img height="45px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
<img height="2px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>

<div align="right">
<sub >how it becomes</sub>
<div>
<sub>basically a dead-end</sub>
<br/>
<sub>for our information?</sub>
</div>
&nbsp;<i>↬<sub>ᔐᖜ</sub><b>↬</b></i> &nbsp; <sub></sub>
and how hard it is to actually <b>parse</b> and <i>use</i>?
</ul>
</div>

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

<div align="left">
<img height="30px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>compromise <a href="https://observablehq.com/@spencermountain/compromise-justification">tries its best</a> to turn text into data.
<img height="10px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>compromise <i><a href="https://observablehq.com/@spencermountain/compromise-justification">tries its best</a></i> to turn text into data.
<br/>
<img height="30px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>it makes limited and sensible decisions.
<br/>
<sub >
<img height="15px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/> it is not as smart as you'd think.
<img height="15px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/> it's not as smart as you'd think.
</sub>

<img height="45px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
Expand Down Expand Up @@ -95,8 +91,8 @@ doc.text()
<!-- spacer -->
<img height="50px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>

<div align="center">
the idea is to be not fancy at all:
<div align="left">
<i>don't be fancy, at all:</i>
</div>

```js
Expand All @@ -113,7 +109,7 @@ if (doc.has('simon says #Verb')) {


<div align="left">
select parts of the text:
<i>grab parts of the text:</i>
</div>

```js
Expand All @@ -130,7 +126,7 @@ doc.match('the #Adjective of times').text()
<!-- spacer -->
<img height="30px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>

and get data:
<i>and get data:</i>
```js
import plg from 'compromise-speech'
nlp.extend(plg)
Expand Down Expand Up @@ -268,7 +264,7 @@ doc.verbs().toNegative()
<!-- spacer -->
<img height="30" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>

compromise is **~200kb** (minified):
compromise is **~250kb** (minified):

<div align="center">
<!-- filesize -->
Expand Down Expand Up @@ -560,7 +556,7 @@ _(match methods use the [match-syntax](https://docs.compromise.cool/compromise-m
- **[.insertBefore(str)](https://observablehq.com/@spencermountain/compromise-insert)** - add these new terms to the front of each match (prepend)
- **[.insertAfter(str)](https://observablehq.com/@spencermountain/compromise-insert)** - add these new terms to the end of each match (append)
- **[.concat()](https://observablehq.com/@spencermountain/compromise-insert)** - add these new things to the end
- **[.swap(fromLemma, toLemma)](https://observablehq.com/@spencermountain/compromise-insert)** - smart replace of root-words,using proper conjugation
- **[.swap(fromLemma, toLemma)](https://observablehq.com/@spencermountain/compromise-root)** - smart replace of root-words,using proper conjugation

##### Transform

Expand Down Expand Up @@ -833,6 +829,7 @@ nlp.extend({
| [Whitespace](https://observablehq.com/@spencermountain/compromise-whitespace) | [Verbs](https://observablehq.com/@spencermountain/verbs) | [Typeahead](https://observablehq.com/@spencermountain/compromise/compromise-typeahead) |
| [World data](https://observablehq.com/@spencermountain/compromise-world) | [Normalization](https://observablehq.com/@spencermountain/compromise-normalization) | [Sweep](https://observablehq.com/@spencermountain/compromise-sweep) |
| [Fuzzy-matching](https://observablehq.com/@spencermountain/compromise-fuzzy-matching) | [Typescript](https://observablehq.com/@spencermountain/compromise-typescript) | [Mutation](https://observablehq.com/@spencermountain/compromise-mutation) |
| [Root-forms](https://observablehq.com/@spencermountain/compromise-root) | | |


<div >
Expand Down
3 changes: 1 addition & 2 deletions builds/compromise.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions builds/one/compromise-one.cjs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions builds/one/compromise-one.mjs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions builds/three/compromise-three.cjs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions builds/three/compromise-three.mjs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions builds/two/compromise-two.cjs

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions builds/two/compromise-two.mjs

Large diffs are not rendered by default.

27 changes: 17 additions & 10 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ compromise uses semver, and pushes to npm and github frequently

While all _Major_ releases should be reviewed, our only _large_ releases are **v6** in 2016 **v12** in 2019 and **v14** in 2022. Others have been mostly incremental.

<!-- #### 14.4.0 [Unreleased]
<!-- #### 14.5.0 [Unreleased]
-->
#### 14.4.1 [July 2022]
- **[change]** - improvements to negative-optional match logic - `!foo?`
- **[change]** - support short sentences embedded in quotes+parentheses
- **[change]** - faster sentence tokenizer
- **[change]** - ° symbol is not punctuation
- **[new]** - implement .swap() for comparative/superlative adjectives
- **[fix]** - sentence.toFuture() conjugation rules
- **[update]** - dependencies

#### 14.4.0 [July 2021]
#### 14.4.0 [July 2022]
- **[change]** - support root matches like '{walk}' work without doing .compute('root')
- **[change]** - split numbers+units '12km' as contraction - #919
- **[new]** - `.lazy(txt, match)` fast-scan method [1](https://observablehq.com/@spencermountain/compromise-performance)
Expand All @@ -22,22 +29,22 @@ While all _Major_ releases should be reviewed, our only _large_ releases are **v
- **[update]** - dependencies
_plugin-releases_: dates, speed, de-compromise

#### 14.3.1 [June 2021]
#### 14.3.1 [June 2022]
- **[fix]** - missed caches in .sweep()
- **[new]** - .out('hash') and `.json({hash:true})`

#### 14.3.0 [June 2021]
#### 14.3.0 [June 2022]
- **[fix]** - unwanted logging in compromise/one
- **[fix]** - dependency export path for react-native builds #928
- **[change]** - split hyphenated words in match syntax 'foo-bar'
- **[change]** - support 4-digit number-ranges (when not a phone number)
_plugin-releases_: dates

#### 14.2.1 [June 2021]
#### 14.2.1 [June 2022]
- **[fix]** - double-contraction issue #925
- **[fix]** - .not() memleak #926

#### 14.2.0 [June 2021]
#### 14.2.0 [June 2022]
- **[fix]** - speed improvements
- **[fix]** - bug with fast-or possessive matches
- **[fix]** - bug with slow-or end-matches
Expand All @@ -55,7 +62,7 @@ While all _Major_ releases should be reviewed, our only _large_ releases are **v
- **[fix]** - drop deprecated .subst() method internally
- **[new]** - some support for .numbers().units() again #919

#### 14.1.2 [April 2021]
#### 14.1.2 [April 2022]
- **[new]** - add .harden() .soften() undocumented methods
- **[fix]** - support pre-parsed matches in .has() .if() and .not()
- **[fix]** - contraction OR match issue
Expand All @@ -64,10 +71,10 @@ While all _Major_ releases should be reviewed, our only _large_ releases are **v
- **[update]** - date plugin release
- **[update]** - dependencies

#### 14.1.1 [April 2021]
#### 14.1.1 [April 2022]
- **[fix]** - main property in package.json #911

#### 14.1.0 [April 2021]
#### 14.1.0 [April 2022]
- **[fix]** - client-side export format for plugins
- **[new]** - more adjective transformation methods
- **[new]** - emoji + emoticon tagger
Expand Down
Loading

0 comments on commit ddf6ec4

Please sign in to comment.