Skip to content

Commit

Permalink
Compute stats (#196)
Browse files Browse the repository at this point in the history
* Rewrote `supportedChars` function, fix many bugs.

* Rewrote the `computeDigrams` function.

* Fixed minor bug.

* Slightly better names.

* Rewrote the `computeTrigrams` function.

* Merged `computeDigrams` and `computeTrigrams`.

* bugfix: Removed extra unnecessary computations.

* bugfix: prioritise 1DK over any other dead key.

* Dumb bug fixes.

* Simpler ngrams structure.

* Fixed ngrams that uses a deadKey + normalization.

* Fixed bad redirects.

* Fixed layouts with deadKeys, but no ODK.

* "Some code repetition is fine, actually..."

* Fixed ISRT.

* Corretly handles deadKeys when naming the ngrams.

* Fixed normalization when characters are missing.

* Reverted the extra digit of precision on trigrams.

* Replaced all `==`/`!=` with a sed command.

* Better documentation.

* Ngram categories are now a global variable.

* You saw nothing.
  • Loading branch information
Nuclear-Squid authored Aug 10, 2024
1 parent 98391a9 commit 32b9833
Show file tree
Hide file tree
Showing 6 changed files with 294 additions and 240 deletions.
1 change: 1 addition & 0 deletions code/collapsable-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class CollapsableTable extends HTMLElement {
`<tr><th colspan='2'>${title}</td></tr>` +
Object.entries(values)
.filter(([digram, freq]) => freq >= 10 ** -precision)
.sort(([_, freq1], [__, freq2]) => freq2 - freq1)
.map(
([digram, freq]) =>
`<tr><td>${digram}</td><td>${freq.toFixed(precision)}</td></tr>`,
Expand Down
Loading

0 comments on commit 32b9833

Please sign in to comment.