Text Entry Throughput
Text entry throughput introduced by Minguri et al. is a text entry method-independent throughput metric based on Shannon information theory.
This crate is a third-party implementation of TET.
TL;DR
use TextEntryThroughput;
// A preset for English alphabet is provided.
// An explanation for other language texts is wrote on later.
let tet = alphabet_letter_distribution;
let presented_text = "my watch fell in the waterprevailing wind from the east";
let transcribed_text = "my wacch fell in waterpreviling wind on the east";
let s = from_secs; // 4 characters per second
let throughput = tet.calc.unwrap;
assert!;
Usage
Get distribution
First, prepare a distribution of characters to get entropy H(X)
from source.
use ;
let mut frequency = new;
// get frequency of each character
let source = "large and appropriate text is recommended";
source.chars
.for_each;
// normalize frequency to get distribution
let distribution = new;
Compute TET
// now you can calculate TET! :+1:
let tet = new;
// Of course, you can use also multibyte characters
// ref. https://doc.rust-lang.org/std/primitive.char.html
let = ;
let s = from_secs; // 4 characters per minute
// Text Entry Throughput (bits/second)
let throughput = tet.calc.unwrap;
Features
serde1
feature allows you to save and load Frequencies
and Distribution
via JSON.
tet_rs = { version = "0.1", features = ["serde1"] }