The dummy model never set a prediction's probability on the suggestion, so it never emitted p, lexical-p, or correction-p values before this branch's changes.
This updates the calculation of the lastModifiedDate property of the
.keyboard_info and .model_info file. It now looks for the most recent
commit to HISTORY.md, and then falls back to the project folder for
.keyboard_info and .model_info.
getLastGitCommitDate now also returns UTC date (it was giving TZ=0
which is affected by daylight saving), and works for a file rather than
just for a folder, and a corresponding unit test has been added.
The date strings returned will now always include '.000' msec suffix. I
have manually verified that the import into the api.keyman.com database
copes with this, and that this change still conforms to the expected
schema for .keyboard_info and .model_info files.
Last, but important, it turned out that the unit tests for kmc were not
running. This has been resolved in kmc/build.sh.
Fixes: #11793
There are three main operations during correction-search:
- replay of old results, if applicable
- generation of new corrections
- generation of predictions rooted on found corrections
Each type naturally has a different 'expected' runtime... so we now make buckets for each. We can then use stats principles to detect outliers on each level. (Mixing them all together = higher variance, thus worse detection.)
Also adds a full set of unit tests at 100% coverage for the new implementation.
Fun detail - in practice, when running all of the unit tests on my personal machine, it's able to pick up a fair few 1-5 ms outliers during the prediction-oriented tests! We previously lacked the resolution to detect those smaller-end cases.
This is work toward #3580, but not the final resolution of it.
While working on #3580, I was noticing some odd behavior after later changes and discovered that the assumption underlying the correction-batching behavior is invalid. It would also complicate other aspects of #3580, so the simplest answer is likely to remove it.
Complication: the promise-status library used for testing our promise usage includes a .d.ts file that is not valid with current TS versions. We now delete theirs and provide our own, fixed version.
The CLDR imports are copied into the build/ folder, so it makes more
sense for them to be done during the build phase, particularly as it is
a very quick operation. (Before this, removing the build/ folder did not
trigger a build.sh configure, so subsequent tests and usage will fail
with confusing LDML import errors. An alternative solution would have
been to declare the configure output to be one of these files.)