Skip to content

Commit

Permalink
Merge pull request #778 from spencermountain/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
spencermountain authored Sep 10, 2020
2 parents 2b90ad5 + 6cc27c8 commit 04a8a79
Show file tree
Hide file tree
Showing 64 changed files with 1,874 additions and 850 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ _(all match methods use the [match-syntax](https://docs.compromise.cool/compromi
- **[.verbs().toFutureTense()](https://observablehq.com/@spencermountain/verbs)** - `'walked' → 'will walk'`
- **[.verbs().toInfinitive()](https://observablehq.com/@spencermountain/verbs)** - `'walks' → 'walk'`
- **[.verbs().toGerund()](https://observablehq.com/@spencermountain/verbs)** - `'walks' → 'walking'`
- **[.verbs().toParticiple()](https://observablehq.com/@spencermountain/verbs)** - `'drive' → 'driven'` - otherwise simple-past ('walked')
- **[.verbs().toNegative()](https://observablehq.com/@spencermountain/verbs)** - `'went' → 'did not go'`
- **[.verbs().toPositive()](https://observablehq.com/@spencermountain/verbs)** - `"didn't study" → 'studied'`
- **[.verbs().isNegative()](https://observablehq.com/@spencermountain/verbs)** - return verbs with 'not'
Expand Down
40 changes: 40 additions & 0 deletions bugs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// let doc = nlp('i am being driven')
// let doc = nlp('i should be driven')
// let doc = nlp('i should have been driven')
// doc.verbs().toParticiple()
// doc.verbs().toPastTense()
// doc.debug()
// console.log(doc.verbs(0).conjugate())
// doc.sentences().toFutureTense().debug()

// console.log(nlp('next week').dates().json())
// nlp('you are John, Lisa, Fred').match('#FirstName{1,2}').debug()

// let doc = nlp('i could study').debug()
// doc.verbs().toParticiple()
// doc.sentences().toPastTense()
// console.log(doc.text())
// i thought he really could have.

// let doc = nlp('i did really walk')
// doc.sentences().toPresentTense()
// console.log(doc.text())

// nlp('lowered according').debug()
// nlp('it bristles outwards, brushlike.').debug()
// nlp('red-shouldered').debug()
// nlp('age of it').debug()
// nlp('so well that').debug()
// nlp('is off-white').debug()
// nlp('polyunsaturated').debug()
// nlp('favoured treat').debug()

/*
Snowboarding is a winter sport. [snowboarding = subject]
I love snowboarding. [snowboarding = object ]
I am excited by snowboarding. [snowboarding = object of a preposition]
One popular sport is snowboarding. [snowboarding = subject complement]
Right now, the athlete is snowboarding. [is snowboarding = present continuous]
He was snowboarding yesterday afternoon. [was snowboarding = past continuous]
Tomorrow, my friends and I are going to be snowboarding. [are going to be snowboarding = future
*/
2 changes: 1 addition & 1 deletion builds/compromise-tokenize.js

Large diffs are not rendered by default.

305 changes: 242 additions & 63 deletions builds/compromise.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/compromise.min.js

Large diffs are not rendered by default.

305 changes: 242 additions & 63 deletions builds/compromise.mjs

Large diffs are not rendered by default.

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

#### [Unreleased]

-move (some) contractions into tokenizer?
#### 13.4.0

- **[change]** stop including adverbs and some auxiliaries in `.conjugate()` results
- **[change]** .append() and .prepend() on an empty doc now creates a new doc
- **[new]** add `verbs().toParticiple()` method (add to observables/verb)
- **[new]** add `sentences().toParticiple()` method (add to observables/verb)
- **[fix]** some verb-tagging issues
- **[fix]** contractions issue in `.clone()`
- **[fix]** try harder to retain modal-verbs in conjugation - 'i should drive' no-longer becomes 'i will drive'

#### 13.3.2

Expand Down
2 changes: 1 addition & 1 deletion data/abbreviations/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = [
'lat', //latitude
'lng', //longitude
'vol', //volume
'psa', //psalms
// 'psa', //psalms
'fm', //not am
'def', //definition
'misc',
Expand Down
2 changes: 1 addition & 1 deletion data/dates/dates.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// uncontroversial date words
module.exports = ['today', 'tomorrow', 'tmr', 'tmrw', 'yesterday', 'weekend']
module.exports = ['today', 'tomorrow', 'tmr', 'tmrw', 'yesterday', 'weekend', 'ago']
1 change: 1 addition & 0 deletions data/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {

if: 'Condition',
unless: 'Condition',
lest: 'Condition',

said: 'PastTense',
had: 'PastTense',
Expand Down
2 changes: 2 additions & 0 deletions data/nouns/singulars.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = [
'home run',
'home',
'house',
'insect',
'lunch',
'meeting',
'model',
Expand All @@ -47,6 +48,7 @@ module.exports = [
'question mark',
'room',
'rose',
'size',
'sky',
'student',
'stuff',
Expand Down
Loading

0 comments on commit 04a8a79

Please sign in to comment.