Commit graph

66 commits

Author SHA1 Message Date
jahorton
e801406640 fix(common/models): replaces the single 'startsWith' use 2022-06-14 14:41:56 +07:00
Marc Durdin
fcf78bcd94 chore: merge master into branch 2022-05-27 13:11:23 +10:00
jahorton
b2eca8b7c4 docs(common/models): addresses PR concerns 2022-04-29 09:42:34 -05:00
jahorton
058e83464f fix(common/models): re-attaches left-context-final single-quote for contractions 2022-04-26 10:09:21 -05:00
Marc Durdin
e0b308b983 chore(web): cleanup for ts projects 2022-04-13 15:19:55 +10:00
Marc Durdin
0ac04d0530 chore(web): Merge branch 'beta' into chore/web/no-more-lerna 2022-04-12 21:17:15 +10:00
Marc Durdin
4d94786852 chore(web): replace lerna with npm workspaces and ts projects
Fixes #6320.

Part 1 of moving from lerna to a simpler, maintained monorepo solution,
using TypeScript Projects and NPM Workspaces.

There is more work to be done here. At this point, KeymanWeb builds and
runs without errors, but the built file is substantially different,
mostly in include order.

Using TypeScript Projects, we move away from the need to run build
scripts in various locations for almost all the Typescript modules.

TODO: Embedded versions and tests have not been verified.

TODO: developer/server is not yet verified.

TODO: developer/js (needs a rename!) is not yet verified.

TODO: Currently, the predictive-text folder needs refactoring to move
the construction of the worker wrapper out of the Predictive Text build
and into the final assembly of keymanweb.js (as it should be valid to
run it as a separate .js anyway).

TODO: Most of the `<reference>` paths need to be re-verified. Ideally
there should be no references outside the current module for any given
.ts.

TODO: The embedded vs browser vs node (headless) builds should be tidied
up for consistency so that it's obvious what depends on what. This is
currently messiest in the predictive-text folder, where the output names
diverge from the filenames and the various files are mixed in the same
folder (as evidenced by the exclusions listed in each tsconfig.json).

TODO: `npm install` should be removed from most build scripts and
instead `npm ci` (#6196) should be run only once from the top-level
folder for any given build. I've had eliminated side-effects from the
`install` action for npm, which makes it easier to reason about state.

TODO: verify_npm_setup and related functions can probably be eliminated.

TODO: most of the build scripts should be largely eliminated for web.

TODO: several ts projects use inconsistent output folders.

TODO: it may be possible to generate a .d.ts for models/types so that
we can use a consistent reference for those as well.

TODO: build.sh, tsconfig.json should always be in the module's top-level
folder, not in a subfolder such as src (e.g. see input-processor/src,
keyboard-processor/src, web/source).

TODO: resources/web-environment should be in common/web.

TODO: other js node_modules imports should be wrapped like es6-shim.

TODO: fix up the publish code for npm modules

TODO: eliminate version numbers from package.json if possible?

Whew, that's most of the stuff I noticed!
2022-04-12 21:02:33 +10:00
Marc Durdin
49eb062c65 feat(web): prediction casing follows current layer
Fixes #6455.

This involved adding an extra hint to the data passed into the lexical
model layer, being the CasingForm that the current layer wants to use.

Given there are several entry points to the lexical model layer, this
meant a few places where we needed to check the current layer.

I refactored the very long function `InputProcessor.processKeyEvent` to
extract out the `buildAlternates` function. There should be no
functional changes to the `buildAlternates` code. But it makes
`processKeyEvent` significantly easier to read.
2022-04-08 16:14:01 +10:00
Marc Durdin
e616900cad
Revert "feat(web): prediction casing follows current layer" 2022-04-08 14:50:32 +10:00
Marc Durdin
b7ce99480f feat(web): prediction casing follows current layer
Fixes #6455.

This involved adding an extra hint to the data passed into the lexical
model layer, being the CasingForm that the current layer wants to use.

Given there are several entry points to the lexical model layer, this
meant a few places where we needed to check the current layer.

I refactored the very long function `InputProcessor.processKeyEvent` to
extract out the `buildAlternates` function. There should be no
functional changes to the `buildAlternates` code. But it makes
`processKeyEvent` significantly easier to read.
2022-04-01 16:20:50 +11:00
jahorton
785b9500c1 fix(common/models): correction-search smp issues 2021-02-10 10:52:32 +07:00
Joshua Horton
6150075dcf
Merge pull request #3897 from keymanapp/fix/common/models/proper-quote-ordering
fix(common/models): proper RTL quote ordering
2020-11-27 11:50:13 +07:00
jahorton
7e7b8756ea fix(common/models): proper RTL quote ordering 2020-11-19 10:55:09 +07:00
jahorton
276b2d2bd0 chore(common/models): Merge branch 'master' into feat/common/models/integrated-suggestion-casing-tests 2020-11-18 13:39:33 +07:00
jahorton
9dc222c05c refactor(common/models): common isLowSurrogate() 2020-11-18 10:13:09 +07:00
jahorton
f7869c48b3 fix(common/models): fixes non-nil context predict bug 2020-11-11 15:42:27 +07:00
jahorton
761494996b chore(common/models/types): CasingEnum -> CasingForm 2020-11-11 08:55:26 +07:00
Joshua Horton
cb42240360
chore: Update common/models/templates/src/common.ts
Co-authored-by: Eddie Antonio Santos <Eddie.Santos@nrc-cnrc.gc.ca>
2020-11-11 08:44:49 +07:00
jahorton
67e08be599 docs(developer/compilers): removes finished TODOs 2020-11-05 10:20:37 +07:00
jahorton
5c9c2bd8e6 feat(developer/compilers): initial applyCasing compilation, new code reorg 2020-11-04 15:08:20 +07:00
jahorton
b800eaa96d feat(developer/compilers): starts lexical model compiler aspects 2020-11-04 15:07:57 +07:00
jahorton
47b0a88a9b feat(common/models): initial groundwork for applyCasing 2020-11-04 15:03:14 +07:00
jahorton
04e68f0185 chore(common/models): Merge branch 'master' into refactor/common/models/common-tokenization-and-wordbreaking 2020-10-21 15:21:49 +07:00
jahorton
1c2537be28 chore(common/models/templates): addresses PR review concerns 2020-10-19 14:22:45 +07:00
jahorton
cf8cbbfff4 refactor(common/models): refactors old wordbreak tests 2020-10-14 12:32:25 +07:00
jahorton
1688366033 refactor(common/models): LMLayer use of refactored funcs 2020-10-14 12:16:35 +07:00
jahorton
d969b76345 refactor(common/core): makes tokenization methods common, removes from LexicalModel 2020-10-14 10:48:09 +07:00
jahorton
255ade52a8 feat(common/models): context tokenization enhancements 2020-10-14 10:17:14 +07:00
Eddie Antonio Santos
dfce22252c
refactor(common/models): replace & {p} with Outcome type 2020-10-13 09:28:48 -06:00
jahorton
298118afe7 feat(common/models): mergedTransform unit tests 2020-10-07 10:16:51 +07:00
jahorton
3a04cf2e91 change(common/models): prependTransform -> mergedTransform 2020-10-06 14:19:27 +07:00
jahorton
2355db4c46 feat(common/models): 'revert' now uses model's punctuation 2020-10-06 14:14:23 +07:00
jahorton
8d5b70cd77 feat(common/models): transformToSuggestion unit test 2020-10-06 10:39:32 +07:00
jahorton
07067227bd refactor(common/models): centralizes quotation logic, defs 2020-10-06 09:06:00 +07:00
jahorton
a8ebdaee1b docs(common/models): adds doc for important assumption 2020-10-01 12:41:55 +07:00
jahorton
b1c44877f6 docs(common/models): restores comment 2020-10-01 12:34:38 +07:00
jahorton
e5c37f7afc refactor(common/models): centralizes suggestion & keep inits 2020-10-01 12:32:10 +07:00
Joshua Horton
7e3cf8adc2
Merge pull request #3575 from keymanapp/feat/common/models/correction-improvement
feat(common/models): Correction improvement
2020-09-23 09:24:07 +07:00
jahorton
4952b591a2 feat(common/models): corrections use keying, branch thresholding 2020-09-11 10:26:53 +07:00
jahorton
33def63e93 chore(common/models): Merge branch 'master' into feat/common/models/context-tracking 2020-09-09 09:25:32 +07:00
jahorton
42d5b538b4 chore(common/models): Merge branch 'master' into feat/common/models/distance-modeling-core 2020-09-09 09:22:25 +07:00
jahorton
2953a909e6 feat(common/models/templates): LexicalModel.tokenize() 2020-09-02 09:50:47 +07:00
jahorton
4380265466 feat(common/models): core correction-search 2020-08-28 11:39:10 +07:00
Joshua Horton
db4042e3b8
Merge pull request #3486 from keymanapp/feat/common/models/priority-queue-batch-ops
feat(common/models): efficient batch-enqueue
2020-08-25 08:34:48 +07:00
Joshua Horton
8d626d59d6
Merge pull request #3480 from keymanapp/feat/common/models/priority-queue
feat(common/models):  actual priority queue for Trie models
2020-08-25 08:34:33 +07:00
jahorton
fbb60cb1f9 chore(common/models): Merge branch 'feat/common/models/lexicon-navigation' into feat/common/models/edit-distance-calc-import 2020-08-24 10:42:41 +07:00
Joshua Horton
bbfc206aa6
change(common/models): clearer code ordering
Co-authored-by: Eddie Antonio Santos <Eddie.Santos@nrc-cnrc.gc.ca>
2020-08-24 10:39:27 +07:00
jahorton
e919a39d85 change(common/models): suggested loop tweaks 2020-08-24 10:32:55 +07:00
jahorton
137dda31be change(common/models): addresses review comments 2020-08-24 10:24:12 +07:00
Joshua Horton
69e19a0cd3
chore(common/models): Apply suggestions from code review
getRootTraversal -> traverseFromRoot

Co-authored-by: Eddie Antonio Santos <Eddie.Santos@nrc-cnrc.gc.ca>
2020-08-24 09:11:28 +07:00