This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python -O | |
| # | |
| # Copyright (c) 2013 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # treeify.py: convert PTB parse to LaTeX's `qtree`/`tikz-qtree` format | |
| # | |
| # NB: this only works for documents with a single tree, due to a limitation | |
| # with `nltk.tree`. | |
| import fileinput | |
| from nltk import Tree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scipy.stats | |
| def mcnemar_p(n1: int, n2: int) -> float: | |
| """Computes McNemar's test. | |
| Args: | |
| n1: the number of "wins" for the first condition. | |
| n2: the number of "wins" for the second condition. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (c) 2014-2015 Kyle Gorman <[email protected]> | |
| # | |
| # 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: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env Rscript | |
| # WALS131A.R | |
| # Kyle Gorman <[email protected]> | |
| # | |
| # 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): | |
| # |