Skip to content

Commit

Permalink
Merge pull request #907 from spencermountain/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
spencermountain authored Apr 12, 2022
2 parents 52fb03e + b22043f commit 0b4bf94
Show file tree
Hide file tree
Showing 162 changed files with 7,375 additions and 18,402 deletions.
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ jobs:
${{ runner.os }}-node-
- run: npm ci
- run: npm i --no-save c8
- run: npm run codecov
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
npm ci
# npm i --no-save ts-node typescript
# npm run plugins:ci
npm run plugins:ci
- name: static checks
run: |
Expand Down
10 changes: 8 additions & 2 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@
.abbreviations()
.phoneNumbers()

.adjectives()
.adjectives().json()
.adjectives().adverbs()
.adjectives().toSuperlative()
.adjectives().toComparative()
.adjectives().toAdverb()
.adjectives().toNoun()

.acronyms()
.acronyms().strip()
.acronyms().addPeriods()
Expand All @@ -221,8 +229,6 @@
.possessives().strip()
.quotations()
.quotations().strip()
.adjectives()
.adjectives().json()
.adverbs()
.adverbs().json()

Expand Down
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ it's pretty fast. It can run on keypress:

<div align="center">
<a href="https://observablehq.com/@spencermountain/compromise-performance">
<img width="600" src="https://user-images.githubusercontent.com/399657/68234798-0abdc480-ffd0-11e9-9ac5-8875d185a631.png"/>
<img width="600" src="https://user-images.githubusercontent.com/399657/159795115-ed62440a-be41-424c-baa4-8dd15c48377d.png"/>
</a>
</div>

Expand Down Expand Up @@ -343,7 +343,7 @@ It can do <b>~1mb</b> of text a second - or 10 wikipedia pages.
<i>Infinite jest</i> is takes 3s.

<div align="right">
You can also paralellize, or stream text to it with <a href="https://github.com/spencermountain/compromise/tree/master/plugins/speed">compromise-speed</a>.
You can also parallelize, or stream text to it with <a href="https://github.com/spencermountain/compromise/tree/master/plugins/speed">compromise-speed</a>.
</div>

<!-- spacer -->
Expand Down Expand Up @@ -516,7 +516,7 @@ _(match methods use the [match-syntax](https://docs.compromise.cool/compromise-m
- **[.splitBefore('')](https://observablehq.com/@spencermountain/compromise-split)** - partition a phrase before each matching segment
- **[.splitAfter('')](https://observablehq.com/@spencermountain/compromise-split)** - partition a phrase after each matching segment
- **[.lookup([])](https://observablehq.com/@spencermountain/compromise-match)** - quick find for an array of string matches
- **[.autofill()](https://observablehq.com/@spencermountain/compromise-typeahead)** - create type-ahead assumptions on the document
- **[.autoFill()](https://observablehq.com/@spencermountain/compromise-typeahead)** - create type-ahead assumptions on the document

##### Tag

Expand Down Expand Up @@ -682,6 +682,15 @@ _(these methods are on the main `nlp` object)_
- **[.sentences().isExclamation()](https://observablehq.com/@spencermountain/compromise-sentences)** - return sentences with a `!`
- **[.sentences().isStatement()](https://observablehq.com/@spencermountain/compromise-sentences)** - return sentences without `?` or `!`

##### Adjectives
- **[.adjectives()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'quick'`
- **[.adjectives().json()](https://observablehq.com/@spencermountain/compromise-selections)** - get adjective metadata
- **[.adjectives().adverbs()](https://observablehq.com/@spencermountain/compromise-selections)** - get adverbs describing this adjective
- **[.adjectives().toComparative()](https://observablehq.com/@spencermountain/compromise-selections)** - 'quick' -> 'quicker'
- **[.adjectives().toSuperlative()](https://observablehq.com/@spencermountain/compromise-selections)** - 'quick' -> 'quickest'
- **[.adjectives().toAdverb()](https://observablehq.com/@spencermountain/compromise-selections)** - 'quick' -> 'quickly'
- **[.adjectives().toNoun()](https://observablehq.com/@spencermountain/compromise-selections)** - 'quick' -> 'quickness'

##### Misc selections

- **[.clauses()](https://observablehq.com/@spencermountain/compromise-selections)** - split-up sentences into multi-term phrases
Expand All @@ -704,8 +713,6 @@ _(these methods are on the main `nlp` object)_
- **[.places()](https://observablehq.com/@spencermountain/topics-named-entity-recognition)** - like 'Paris, France'
- **[.organizations()](https://observablehq.com/@spencermountain/topics-named-entity-recognition)** - like 'Google, Inc'
- **[.topics()](https://observablehq.com/@spencermountain/topics-named-entity-recognition)** - `people()` + `places()` + `organizations()`
- **[.adjectives()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'quickly'`
- **[.adjectives().json()](https://observablehq.com/@spencermountain/compromise-selections)** - get adjective metadata
- **[.adverbs()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'quickly'`
- **[.adverbs().json()](https://observablehq.com/@spencermountain/compromise-selections)** - get adverb metadata
- **[.acronyms()](https://observablehq.com/@spencermountain/compromise-selections)** - things like `'FBI'`
Expand Down Expand Up @@ -817,7 +824,7 @@ nlp.extend({
| [Named-Entities](https://observablehq.com/@spencermountain/compromise-topics) | [Utils](https://observablehq.com/@spencermountain/compromise-utils) | [Penn-tags](https://observablehq.com/@spencermountain/compromise-penn-tags) |
| [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) | |
| [Fuzzy-matching](https://observablehq.com/@spencermountain/compromise-fuzzy-matching) | [Typescript](https://observablehq.com/@spencermountain/compromise-typescript) | |
| [Fuzzy-matching](https://observablehq.com/@spencermountain/compromise-fuzzy-matching) | [Typescript](https://observablehq.com/@spencermountain/compromise-typescript) | [Mutation](https://observablehq.com/@spencermountain/compromise-mutation) |


<div >
Expand Down
4 changes: 2 additions & 2 deletions builds/compromise.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions builds/three/compromise-three.cjs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions builds/three/compromise-three.mjs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions builds/two/compromise-two.cjs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions builds/two/compromise-two.mjs

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ While all _Major_ releases should be reviewed, our only two _large_ releases are
-->

### 14.0.0 &nbsp; :postal_horn: [March 2022]
#### 14.1.0 [March 2021]
- **[fix]** - client-side export format for plugins
- **[new]** - more adjective transformation methods
- **[new]** - emoji + emoticon tagger
- **[new]** - case-sensitive match option - `{caseSensitive:true}`

### 🚨 14.0.0 🚨 &nbsp; [March 2022]
Major release - see [Release Notes](https://github.com/spencermountain/compromise/releases/tag/14.0.0) for full details

- **[breaking]** - remove `.parent()` and `.parents()` chain - (use `.all()` instead)
Expand Down
2 changes: 2 additions & 0 deletions data/lexicon/adjectives/adjectives.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,5 +628,7 @@ export default [
'antique',
'dependent',
'independent',
'seated',
'modest',
]

6 changes: 6 additions & 0 deletions data/lexicon/nouns/singulars.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export default [
'christmas carol',
'girl',
'handful',
'bowl',
'super bowl',
'team',
'ham',
Expand Down Expand Up @@ -253,6 +254,7 @@ export default [
'photocopier',
'occupier',
'drier',
'tier',
'barrier',
'carrier',
'courier',
Expand Down Expand Up @@ -301,6 +303,7 @@ export default [
'head start',
'breakfast',
'priest',
'athiest',

// -ist
'waist',
Expand Down Expand Up @@ -379,6 +382,9 @@ export default [
'pie',
'rerun',
'bride',
'menu',

'owner'
]


8 changes: 6 additions & 2 deletions data/lexicon/nouns/uncountables.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default [
'billiards',
'bison',
'blood',
'bowls',
'bread',
'bunting',
'butter',
Expand All @@ -38,6 +37,7 @@ export default [
'cotton',
'currency',
'diabetes',
'downstairs',
'draughts',
'economics',
'education',
Expand Down Expand Up @@ -152,7 +152,6 @@ export default [
'soap',
'soccer',
'spacecraft',
'species',
'speed',
'statistics',
'steam',
Expand All @@ -169,6 +168,7 @@ export default [
'trouble',
'trousers',
'trout',
'troops',
'true north',
'tuna',
'vinegar',
Expand All @@ -187,6 +187,10 @@ export default [
'less',
'haste',

'series',
'species',
'clothes',


'skin',
'greed',
Expand Down
2 changes: 2 additions & 0 deletions data/lexicon/switches/adj-noun.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export default [
'fellow',
'female',
'fluid',
'fine',
'gold',
'genious',
'homeless',
'ideal',
'incumbent',
Expand Down
2 changes: 2 additions & 0 deletions data/lexicon/switches/noun-verb.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ export default [
'rush',
'rust',
'sail',
'sacrifice',
'scale',
'scan',
'scar',
Expand Down Expand Up @@ -545,6 +546,7 @@ export default [
'skip',
'sleep',
'slice',
'service',
'slip',
'slit',
'smell',
Expand Down
2 changes: 2 additions & 0 deletions data/pairs/PastTense.js
Original file line number Diff line number Diff line change
Expand Up @@ -2036,4 +2036,6 @@ export default [
['poked', 'poke'],
['retook', 'retake'],
['levelled', 'level'],
['dared', 'dare'],
['swam', 'swim'],
]
4 changes: 3 additions & 1 deletion data/pairs/Superlative.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ export default [
['tough', 'toughest'],
['weak', 'weakest'],
['white', 'whitest'],
['wide', 'widest']
['wide', 'widest'],
['dire', 'direst'],
['polite', 'politest'],


]
Loading

0 comments on commit 0b4bf94

Please sign in to comment.