From: Neil Smith Date: Tue, 22 Jul 2014 12:46:39 +0000 (+0100) Subject: Don't create language_models.py twice X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=34ba3d687eb48af30929b4550f14d1a599179efd;p=cipher-training.git Don't create language_models.py twice --- diff --git a/slides/caesar-break.html b/slides/caesar-break.html index 7a2fbf6..8792446 100644 --- a/slides/caesar-break.html +++ b/slides/caesar-break.html @@ -246,8 +246,6 @@ with open('count_1l.txt', 'w') as f: # Reading letter probabilities -New file: `language_models.py` - 1. Load the file `count_1l.txt` into a dict, with letters as keys. 2. Normalise the counts (components of vector sum to 1): `$$ \hat{\mathbf{x}} = \frac{\mathbf{x}}{\| \mathbf{x} \|} = \frac{\mathbf{x}}{ \mathbf{x}_1 + \mathbf{x}_2 + \mathbf{x}_3 + \dots }$$`