Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: spencermountain/compromise
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 14.11.0
Choose a base ref
...
head repository: spencermountain/compromise
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jan 3, 2024

  1. New tests

    ryancasburn-KAI committed Jan 3, 2024
    Copy the full SHA
    70d91d3 View commit details
  2. Copy the full SHA
    c721435 View commit details
  3. Copy the full SHA
    ea477d9 View commit details
  4. Copy the full SHA
    84ab5ec View commit details
  5. Merge pull request #1072 from ryancasburn-KAI/update-main-clause-dete…

    …rmination
    
    Update main clause determination
    spencermountain authored Jan 3, 2024
    Copy the full SHA
    f92b993 View commit details

Commits on Jan 5, 2024

  1. Copy the full SHA
    b5069c9 View commit details
  2. implement fix

    ryancasburn-KAI committed Jan 5, 2024
    Copy the full SHA
    a84129d View commit details
  3. Copy the full SHA
    f483252 View commit details
  4. 3
    Copy the full SHA
    e15e3a6 View commit details

Commits on Jan 6, 2024

  1. Copy the full SHA
    508a45e View commit details
  2. 18 is-has failing

    spencermountain committed Jan 6, 2024
    Copy the full SHA
    58b2b41 View commit details
  3. 13 failing

    spencermountain committed Jan 6, 2024
    Copy the full SHA
    ca9d468 View commit details
  4. 14 failing

    spencermountain committed Jan 6, 2024
    Copy the full SHA
    0fd7141 View commit details
  5. Copy the full SHA
    70b32be View commit details
  6. more words

    spencermountain committed Jan 6, 2024
    Copy the full SHA
    9be96df View commit details
  7. more tagging fixes

    spencermountain committed Jan 6, 2024
    Copy the full SHA
    20296b5 View commit details
  8. 12 failing

    spencermountain committed Jan 6, 2024
    Copy the full SHA
    d2b8cd1 View commit details
  9. 8 failing

    spencermountain committed Jan 6, 2024
    Copy the full SHA
    4265424 View commit details

Commits on Jan 15, 2024

  1. Copy the full SHA
    6b8b993 View commit details
  2. implement change for "about"

    remove about from adjective, add it to adj-past as an adjective.
    ryancasburn-KAI committed Jan 15, 2024
    Copy the full SHA
    f5eba3d View commit details
  3. tests for also

    ryancasburn-KAI committed Jan 15, 2024
    Copy the full SHA
    fe6e433 View commit details
  4. Copy the full SHA
    a26630d View commit details

Commits on Jan 16, 2024

  1. Merge pull request #1078 from ryancasburn-KAI/also-fix

    Fix for some switch lock-ins for common terms
    spencermountain authored Jan 16, 2024
    Copy the full SHA
    2b2693c View commit details
  2. 2 tests failing

    spencermountain committed Jan 16, 2024
    Copy the full SHA
    c67da42 View commit details
  3. one test failing

    spencermountain committed Jan 16, 2024
    Copy the full SHA
    a45865e View commit details
  4. tests passing

    spencermountain committed Jan 16, 2024
    Copy the full SHA
    baa16bb View commit details
  5. 14.11.1rc

    spencermountain committed Jan 16, 2024
    Copy the full SHA
    cc864eb View commit details
  6. Copy the full SHA
    015ce33 View commit details

Commits on Jan 19, 2024

  1. Copy the full SHA
    977a621 View commit details
  2. fix freezelex in #1080

    spencermountain committed Jan 19, 2024
    Copy the full SHA
    599d6a0 View commit details
  3. Copy the full SHA
    bc8a784 View commit details
  4. neighbours test

    spencermountain committed Jan 19, 2024
    Copy the full SHA
    2f05324 View commit details
  5. docs for new stuff

    spencermountain committed Jan 19, 2024
    Copy the full SHA
    5eb8c17 View commit details
  6. more tests

    spencermountain committed Jan 19, 2024
    Copy the full SHA
    98a0bf7 View commit details
  7. Copy the full SHA
    ca71fd6 View commit details

Commits on Jan 23, 2024

  1. 1 failing test

    spencermountain committed Jan 23, 2024
    Copy the full SHA
    00e18e8 View commit details
  2. tests passing

    spencermountain committed Jan 23, 2024
    Copy the full SHA
    c943633 View commit details
  3. tests passing

    spencermountain committed Jan 23, 2024
    Copy the full SHA
    65e1fb7 View commit details
  4. fix before method

    spencermountain committed Jan 23, 2024
    Copy the full SHA
    cf92489 View commit details
  5. fix text output issue

    spencermountain committed Jan 23, 2024
    Copy the full SHA
    e5fd879 View commit details
  6. fix clauses issues

    spencermountain committed Jan 23, 2024
    Copy the full SHA
    90a388a View commit details
  7. 14.11.2rc

    spencermountain committed Jan 23, 2024
    Copy the full SHA
    986f774 View commit details
  8. rollback eslint bump

    spencermountain committed Jan 23, 2024
    Copy the full SHA
    82cf964 View commit details
  9. Copy the full SHA
    1e359f4 View commit details

Commits on Jan 26, 2024

  1. Copy the full SHA
    198ae07 View commit details
  2. Copy the full SHA
    60fc6e4 View commit details
  3. ci: bump github actions

    Fdawgs committed Jan 26, 2024
    Copy the full SHA
    20710ab View commit details
  4. Copy the full SHA
    bf81771 View commit details
  5. Copy the full SHA
    0a4e26d View commit details

Commits on Feb 6, 2024

  1. Copy the full SHA
    4e4b42d View commit details
Showing with 7,288 additions and 13,137 deletions.
  1. +0 −61 .eslintrc
  2. +8 −12 .github/workflows/build-and-test.yml
  3. +8 −9 .github/workflows/coverage.yml
  4. +9 −12 .github/workflows/release.yml
  5. +8 −1 .gitignore
  6. +0 −10 .jshintrc
  7. +0 −321 API.md
  8. +43 −38 README.md
  9. +1 −1 builds/compromise.js
  10. +1 −1 builds/one/compromise-one.cjs
  11. +1 −1 builds/one/compromise-one.mjs
  12. +1 −1 builds/three/compromise-three.cjs
  13. +1 −1 builds/three/compromise-three.mjs
  14. +1 −1 builds/two/compromise-two.cjs
  15. +1 −1 builds/two/compromise-two.mjs
  16. +72 −2 changelog.md
  17. +1 −0 data/lexicon/adjectives/adjectives.js
  18. +1 −1 data/lexicon/nouns/organizations.js
  19. +21 −0 data/lexicon/nouns/properNouns.js
  20. +3 −3 data/lexicon/nouns/singulars.js
  21. +2 −2 data/lexicon/numbers/units.js
  22. +212 −0 data/lexicon/places/places.js
  23. +10 −0 data/lexicon/places/regions.js
  24. +1 −3 data/lexicon/switches/adj-gerund.js
  25. +2 −6 data/lexicon/switches/adj-noun.js
  26. +28 −7 data/lexicon/switches/adj-past.js
  27. +88 −8 data/lexicon/switches/noun-gerund.js
  28. +26 −26 data/lexicon/switches/noun-verb.js
  29. +2 −4 data/lexicon/verbs/infinitives.js
  30. +2 −2 data/lexicon/verbs/participles.js
  31. +1 −5 data/pairs/Comparative.js
  32. +40 −0 eslint.config.js
  33. +0 −1,247 learn/comparatives/data.js
  34. +0 −25 learn/comparatives/index.js
  35. +0 −25 learn/gpt/api.js
  36. +0 −34 learn/gpt/list.js
  37. +0 −189 learn/gpt/package-lock.json
  38. +0 −16 learn/gpt/package.json
  39. +0 −9 learn/gpt/scratch.js
  40. +0 −249 learn/phrasals/list.js
  41. +25 −0 one/package.json
  42. +1,766 −1,422 package-lock.json
  43. +67 −41 package.json
  44. +1 −1 plugins/_experiments/ast/package.json
  45. +1 −1 plugins/_experiments/markdown/package.json
  46. +2 −2 plugins/_experiments/sentiment/package.json
  47. +1 −2 plugins/_experiments/sentiment/scratch.js
  48. +5 −6 plugins/_experiments/sentiment/src/emoji.js
  49. +10 −11 plugins/_experiments/sentiment/src/lib.js
  50. +208 −212 plugins/dates/README.md
  51. +903 −601 plugins/dates/builds/compromise-dates.cjs
  52. +1 −1 plugins/dates/builds/compromise-dates.min.js
  53. +1 −1 plugins/dates/builds/compromise-dates.mjs
  54. +23 −0 plugins/dates/changelog.md
  55. +17 −2 plugins/dates/index.d.ts
  56. +10 −9 plugins/dates/package-lock.json
  57. +4 −7 plugins/dates/package.json
  58. +29 −24 plugins/dates/scratch.js
  59. +1 −1 plugins/dates/src/_version.js
  60. +45 −7 plugins/dates/src/api/dates.js
  61. +2 −3 plugins/dates/src/api/durations/index.js
  62. +1 −5 plugins/dates/src/api/find/index.js
  63. +6 −0 plugins/dates/src/api/find/split.js
  64. +8 −0 plugins/dates/src/api/parse/one/01-tokenize/01-shift.js
  65. +2 −3 plugins/dates/src/api/parse/one/01-tokenize/03-time.js
  66. +50 −2 plugins/dates/src/api/parse/one/02-parse/05-explicit.js
  67. +3 −2 plugins/dates/src/api/parse/one/index.js
  68. +1 −1 plugins/dates/src/api/parse/one/units/Unit.js
  69. +5 −0 plugins/dates/src/api/parse/one/units/_year.js
  70. +114 −0 plugins/dates/src/api/parse/range/02-date-range.js
  71. +4 −5 plugins/dates/src/api/times.js
  72. +0 −8 plugins/dates/src/api/toJSON.js
  73. +48 −16 plugins/dates/src/compute/matches.js
  74. +35 −0 plugins/dates/src/debug.js
  75. +1 −1 plugins/dates/src/model/regex.js
  76. +8 −7 plugins/dates/src/plugin.js
  77. +47 −0 plugins/dates/tests/before-after.test.js
  78. +5 −5 plugins/dates/tests/day-start.test.js
  79. +69 −0 plugins/dates/tests/dmy.test.js
  80. +59 −0 plugins/dates/tests/duration-range.test.js
  81. +6 −5 plugins/dates/tests/duration.test.js
  82. +136 −5 plugins/dates/tests/equals.test.js
  83. +5 −0 plugins/dates/tests/startDates.test.js
  84. +2 −2 plugins/paragraphs/package.json
  85. +77 −0 plugins/payload/README.md
  86. +101 −0 plugins/payload/builds/compromise-payload.cjs
  87. +1 −0 plugins/payload/builds/compromise-payload.min.js
  88. +1 −0 plugins/payload/builds/compromise-payload.mjs
  89. +18 −0 plugins/payload/index.d.ts
  90. +55 −0 plugins/payload/package-lock.json
  91. +40 −0 plugins/payload/package.json
  92. +23 −0 plugins/payload/rollup.config.js
  93. +13 −0 plugins/payload/scratch.js
  94. +13 −0 plugins/payload/src/debug.js
  95. +79 −0 plugins/payload/src/plugin.js
  96. +16 −0 plugins/payload/tests/_lib.js
  97. +59 −0 plugins/payload/tests/payload.test.js
  98. +3 −3 plugins/speech/package.json
  99. +2 −2 plugins/speed/package.json
  100. +2 −2 plugins/stats/package.json
  101. +7 −5 plugins/wikipedia/README.md
  102. +10 −7,060 plugins/wikipedia/builds/compromise-wikipedia.cjs
  103. +1 −2 plugins/wikipedia/builds/compromise-wikipedia.min.js
  104. +1 −2 plugins/wikipedia/builds/compromise-wikipedia.mjs
  105. +3 −3 plugins/wikipedia/package.json
  106. +7 −9 plugins/wikipedia/src/plugin.js
  107. +5 −5 rollup.config.js
  108. +9 −357 scratch.js
  109. +2 −1 scripts/debug.js
  110. +1 −0 scripts/typescript/three.ts
  111. +9 −9 src/1-one/cache/methods/cacheDoc.js
  112. +6 −5 src/1-one/change/api/insert.js
  113. +37 −19 src/1-one/change/api/replace.js
  114. +46 −0 src/1-one/freeze/compute.js
  115. +20 −0 src/1-one/freeze/debug.js
  116. +13 −12 src/1-one/freeze/plugin.js
  117. +1 −0 src/1-one/lexicon/compute/index.js
  118. +1 −7 src/1-one/lexicon/compute/multi-word.js
  119. +1 −7 src/1-one/lexicon/compute/single-word.js
  120. +14 −0 src/1-one/match/api/_lib.js
  121. +2 −1 src/1-one/match/api/index.js
  122. +56 −0 src/1-one/match/api/join.js
  123. +2 −3 src/1-one/match/api/lookaround.js
  124. +3 −16 src/1-one/match/api/match.js
  125. +0 −3 src/1-one/match/methods/match/02-from-here.js
  126. +2 −2 src/1-one/match/methods/termMethods.js
  127. +5 −1 src/1-one/output/api/{lib → }/_text.js
  128. +20 −0 src/1-one/output/api/debug.js
  129. +0 −38 src/1-one/output/api/debug/index.js
  130. +5 −4 src/1-one/output/api/html.js
  131. +12 −14 src/1-one/output/api/json.js
  132. +0 −73 src/1-one/output/api/lib/hash.js
  133. +2 −2 src/1-one/output/api/out.js
  134. +4 −3 src/1-one/output/api/text.js
  135. 0 src/1-one/output/{api → methods}/debug/_color.js
  136. +1 −0 src/1-one/output/{api → methods}/debug/chunks.js
  137. +1 −1 src/1-one/output/{api → methods}/debug/client-side.js
  138. +3 −1 src/1-one/output/{api → methods}/debug/highlight.js
  139. +12 −0 src/1-one/output/methods/debug/index.js
  140. +1 −0 src/1-one/output/{api → methods}/debug/tags.js
  141. +62 −0 src/1-one/output/methods/hash.js
  142. +4 −0 src/1-one/output/methods/index.js
  143. +5 −4 src/1-one/output/plugin.js
  144. +1 −2 src/1-one/pointers/api/index.js
  145. +6 −2 src/1-one/sweep/methods/tagger/index.js
  146. +1 −1 src/1-one/tokenize/compute/alias.js
  147. +2 −2 src/1-one/tokenize/methods/01-sentences/04-quote-merge.js
  148. +1 −1 src/1-one/tokenize/methods/02-terms/01-hyphens.js
  149. +44 −7 src/2-two/contraction-two/compute/apostrophe-d.js
  150. +69 −13 src/2-two/contraction-two/compute/apostrophe-s.js
  151. +2 −3 src/2-two/contraction-two/compute/index.js
  152. +76 −11 src/2-two/contraction-two/compute/isPossessive.js
  153. +1 −1 src/2-two/postTagger/compute/index.js
  154. +8 −2 src/2-two/postTagger/model/adjective/adj-adverb.js
  155. +25 −2 src/2-two/postTagger/model/adjective/adj-gerund.js
  156. +27 −3 src/2-two/postTagger/model/adjective/adj-noun.js
  157. +24 −2 src/2-two/postTagger/model/adjective/adj-verb.js
  158. +64 −12 src/2-two/postTagger/model/nouns/nouns.js
  159. +7 −0 src/2-two/postTagger/model/nouns/organizations.js
  160. +7 −0 src/2-two/postTagger/model/nouns/places.js
  161. +1 −1 src/2-two/postTagger/model/numbers/numbers.js
  162. +3 −4 src/2-two/postTagger/model/verbs/adj-gerund.js
  163. +32 −32 src/2-two/preTagger/compute/penn.js
  164. +1 −1 src/2-two/preTagger/compute/tagger/1st-pass/02-hyphens.js
  165. +9 −0 src/2-two/preTagger/compute/tagger/3rd-pass/04-placeWords.js
  166. +1 −1 src/2-two/preTagger/compute/tagger/3rd-pass/05-fallback.js
  167. +10 −8 src/2-two/preTagger/compute/tagger/3rd-pass/06-switches.js
  168. +47 −6 src/2-two/preTagger/model/clues/_adj.js
  169. +78 −53 src/2-two/preTagger/model/clues/_noun.js
  170. +23 −23 src/2-two/preTagger/model/clues/_verb.js
  171. +52 −15 src/2-two/preTagger/model/clues/adj-gerund.js
  172. +24 −21 src/2-two/preTagger/model/clues/adj-past.js
  173. +26 −8 src/2-two/preTagger/model/clues/noun-gerund.js
  174. +17 −17 src/2-two/preTagger/model/lexicon/_data.js
  175. +7 −0 src/2-two/preTagger/model/lexicon/frozenLex.js
  176. +1 −1 src/2-two/preTagger/model/models/_data.js
  177. +30 −11 src/2-two/preTagger/model/patterns/suffixes.js
  178. +16 −1 src/2-two/preTagger/model/placeWords.js
  179. +3 −0 src/2-two/preTagger/model/regex/regex-normal.js
  180. +5 −2 src/2-two/preTagger/tagSet/misc.js
  181. +10 −7 src/3-three/chunker/api/clauses.js
  182. +3 −1 src/3-three/misc/parentheses/fns.js
  183. +0 −1 src/3-three/misc/parentheses/index.js
  184. +3 −1 src/3-three/misc/plugin.js
  185. +1 −0 src/3-three/misc/quotations/fns.js
  186. +26 −0 src/3-three/misc/slashes/index.js
  187. +1 −1 src/3-three/nouns/api/api.js
  188. +23 −14 src/3-three/numbers/numbers/api.js
  189. +32 −0 src/3-three/numbers/numbers/isUnit.js
  190. +10 −0 src/3-three/numbers/plugin.js
  191. +9 −1 src/3-three/sentences/parse/mainClause.js
  192. +2 −1 src/3-three/topics/people/find.js
  193. +1 −1 src/3-three/verbs/api/conjugate/toInfinitive.js
  194. +7 −5 src/API/View.js
  195. +5 −5 src/API/extend.js
  196. +1 −1 src/_version.js
  197. +1 −1 src/one.js
  198. +3 −3 tests/_ignore/quotations.ignore.js
  199. +74 −0 tests/one/change/join.test.js
  200. +13 −1 tests/one/match/doc-match.test.js
  201. +1 −1 tests/one/misc/freeze.test.js
  202. +7 −6 tests/one/misc/slash.test.js
  203. +2 −2 tests/one/misc/unicode.test.js
  204. +11 −2 tests/one/output/html.test.js
  205. +13 −6 tests/one/tokenize/{hyphens.ignore.js → hyphens.test.js}
  206. +5 −9 tests/three/api.test.js
  207. +1 −1 tests/three/chunker/chunks.ignore.js
  208. +1 −1 tests/{_ignore/clause.ignore.js → three/clause.test.js}
  209. +1 −7 tests/three/coreference/more.ignore.js
  210. +1 −1 tests/three/full-api.test.js
  211. +19 −2 tests/three/numbers/units.test.js
  212. +33 −0 tests/three/parentheses.test.js
  213. +0 −2 tests/three/people/people.test.js
  214. +21 −1 tests/three/sentences/svo.test.js
  215. +31 −0 tests/three/slashes.test.js
  216. +23 −7 tests/three/sweep-tag.test.js
  217. +282 −284 tests/three/verbs/toInfinitive.test.js
  218. +14 −0 tests/two/contractions/contraction-match.test.js
  219. +110 −0 tests/two/contractions/had-would.test.js
  220. +204 −0 tests/two/contractions/is-has-possessive.test.js
  221. +43 −0 tests/two/freeze/freeze.test.js
  222. +6 −5 tests/two/freeze/lex.test.js
  223. +19 −1 tests/two/match.test.js
  224. +0 −8 tests/two/tagger/_pennSample.js
  225. +53 −0 tests/two/transform/replace.test.js
  226. +2 −3 tests/two/variables/gerund.test.js
  227. +15 −2 tests/two/variables/past-adj.test.js
  228. +1 −2 tests/two/variables/person-match.test.js
  229. +25 −0 three/package.json
  230. +25 −0 tokenize/package.json
  231. +4 −8 tsconfig.json
  232. +25 −0 two/package.json
  233. +5 −1 types/misc.d.ts
  234. +4 −0 types/one.d.cts
  235. +2 −2 types/one.d.ts
  236. +4 −0 types/three.d.cts
  237. +4 −0 types/two.d.cts
  238. +4 −0 types/view/one.d.cts
  239. +44 −29 types/view/one.d.ts
  240. +4 −0 types/view/three.d.cts
  241. +8 −0 types/view/three.d.ts
  242. +4 −0 types/view/two.d.cts
61 changes: 0 additions & 61 deletions .eslintrc

This file was deleted.

20 changes: 8 additions & 12 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -5,28 +5,24 @@ on: [pull_request]
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
permissions:
contents: read

strategy:
matrix:
node-version: [14.x, 18.x]
node-version: [18.x, 22.x]
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ matrix.node-version }}-
${{ runner.os }}-npm-
cache: npm

- name: install
run: |
17 changes: 8 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -9,19 +9,18 @@ on:
jobs:
getCoverage:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
node-version: '16'
persist-credentials: false

- uses: actions/cache@v3
- uses: actions/setup-node@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: '20'
cache: npm

- run: npm ci
- run: npm i -g c8 codecov
21 changes: 9 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -7,27 +7,24 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

# Note that these steps are *identical* to build-and-test (with the caveat
# that build-and-test uses several versions of Node, and Release only uses
# 10.x) at least until the actual publishing happens. Ideally, we could
# delegate to the build- and-test workflow, but I haven't found a way to do
# that yet.
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
node-version: 16.x
persist-credentials: false

- name: cache dependencies
uses: actions/cache@v3
- uses: actions/setup-node@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-10.x-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-10.x-
${{ runner.os }}-npm-
node-version: 20.x
cache: npm

- name: install
run: |
@@ -58,6 +55,6 @@ jobs:
- name: publish
run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc
npm publish
npm publish --access public --provenance
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -9,4 +9,11 @@ coverage.lcov
codecov.yml
plugins/phrases/data/
learn/giga/result/
.scratch.js
.scratch.js
.eslintrc
.npmignore
.github
.gitignore
LICENSE
package-lock.json
rollup.config.js
10 changes: 0 additions & 10 deletions .jshintrc

This file was deleted.

Loading