Skip to content

Commit 32b9833

Browse files
Compute stats (#196)
* 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.
1 parent 98391a9 commit 32b9833

File tree

6 files changed

+294
-240
lines changed

6 files changed

+294
-240
lines changed

code/collapsable-table.js

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class CollapsableTable extends HTMLElement {
104104
`<tr><th colspan='2'>${title}</td></tr>` +
105105
Object.entries(values)
106106
.filter(([digram, freq]) => freq >= 10 ** -precision)
107+
.sort(([_, freq1], [__, freq2]) => freq2 - freq1)
107108
.map(
108109
([digram, freq]) =>
109110
`<tr><td>${digram}</td><td>${freq.toFixed(precision)}</td></tr>`,

0 commit comments

Comments
 (0)