Skip to content

Instantly share code, notes, and snippets.

View kylebgorman's full-sized avatar

Kyle Gorman kylebgorman

View GitHub Profile
@kylebgorman
kylebgorman / byte.sym
Created July 10, 2019 12:43
OpenFst byte symbol table
<epsilon> 0
<SOH> 1
<STX> 2
<ETX> 3
<EOT> 4
<ENQ> 5
<ACK> 6
<BEL> 7
<BS> 8
<HT> 9
@kylebgorman
kylebgorman / lnre.py
Last active June 18, 2023 05:39
LNRE calculator
#!/usr/bin/env python
"""LNRE calculator.
This script computes a number of statistics characterizing LNRE data:
* N: corpus size
* V: vocabulary size
* V(1): the number of _hapax legomena_ (symbols occuring once)
* V(2): the number of _dis legomena_ (symbols occurring twice)
* V/N: vocabulary growth rate