View EditTransducerTutorial.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View z408.py
#!/usr/bin/env python
# encoding: UTF-8
#
# Constructs resources for Zodiac cipher 408:
#
# * Plaintext and ciphertext FARs
# * Unweighted "key" FSTs and "channel" (hypothesis space) FSTs
# * A textual symbol table for plaintext and ciphertext
#
# Requires: Pynini and OpenFst with the FAR extension.
View rer.c
// Computes relative error reduction given two percentages.
//
// This computes relative error reduction (RER) given two percentages, the
// "before" and "after" accuracy.
//
// This is given by:
//
// RER = 1 - (1 - new_accuracy) / (1 - old_accuracy)
//
// To compile: gcc -O3 -std=c99 -o rer rer.c
View WALS131A.R
#!/usr/bin/env Rscript
# WALS131A.R
# Kyle Gorman <kylebgorman@gmail.com>
#
# Tests the hypothesis that vigesimal (base-20) number systems are more common
# at tropical latitudes. Thanks to Richard Sproat for suggesting this
# hypothesis.
#
# The data is read directly from WALS (#131A):
#
View Simple-linear-models-for-NLP.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View McFarlaneEtAl_MazeData-Deidentified.csv
Study.ID CA VIQ DX Activity Content Filler REP REV FS Cued Not.Cued
CSLU-001 5.6667 124 TD Conversation 24 31 2 5 17 36 50
CSLU-001 5.6667 124 TD Picture Description 1 2 0 0 1 2 3
CSLU-001 5.6667 124 TD Play 21 6 3 8 10 6 27
CSLU-001 5.6667 124 TD Wordless Picture Book 8 2 0 4 4 2 10
CSLU-002 6.5 124 TD Conversation 3 10 3 0 0 10 13
CSLU-002 6.5 124 TD Picture Description 5 3 2 1 2 3 8
CSLU-002 6.5 124 TD Play 8 8 3 2 3 9 15
CSLU-002 6.5 124 TD Wordless Picture Book 2 2 0 0 2 2 4
CSLU-007 7.5 108 TD Conversation 25 21 4 4 17 29 38
View ratio.pyx
"""Functions for computing log-likelihood ratio statistics."""
from libc.math cimport log
from scipy.stats import binom
from scipy.stats import chi2
cpdef double LLR(int c_a, int c_b, int c_ab, int n):
View wcm.py
#!/usr/bin/env python
#
# Copyright (c) 2014 Kyle Gorman
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
View bktree.py
# Copyright (c) 2014-2015 Kyle Gorman <gormanky@ohsu.edu>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
View dense-search.py
#!/usr/bin/env python
# Python 3.5 or greater, but probably backportable with minimal effort.
"""Creates dense crossword puzzle fills.
This module provides code to fill dense cross-word puzzles. It is a work
in progress.
We represent words in a puzzle as a square matrix of bytes.