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 python3 | |
""" | |
Takes a conference TSV file and, optionally, a conference metadata | |
file, and creates the Anthology XML in the ACL Anthology repository.o | |
This file can then be added to the repo and committed. | |
Example usage: | |
- First, fork [the ACL Anthology](https://github.com/acl-org/acl-anthology) to your Github account, and clone it to your drive | |
- Grab one of the [conference TSV files](https://drive.google.com/drive/u/0/folders/1hC7FDlsXWVM2HSYgdluz01yotdEd0zW8) |
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 | |
# This is an MIT-licensed implementation of the sigf toolkit | |
# for randomization tests: https://nlpado.de/~sebastian/software/sigf.shtml | |
from random import getrandbits | |
import sys | |
def randomized_test(model1, model2, score, trials): | |
print('# score(model1) = %f' % score(model1), file=sys.stderr) |
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
#!/bin/python | |
import re | |
import subprocess | |
MATCHLINE = re.compile(r'^(</li>)?<li>(.*)[,.].*\.\s+(.*)\; p\. ([0-9]+)-([0-9]+)\.$') | |
counter = 0 | |
ID='W89-01%02i' |
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
#!/bin/python3 | |
import bibtexparser | |
import subprocess | |
import sys, os | |
OUTPUT_ROOT = sys.argv[1] | |
ACL = "anthology/L/L16" | |
OUTPUT_DIR = os.path.join(OUTPUT_ROOT, ACL) | |
try: |
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
#ifndef MINMAXHEAP_H | |
#define MINMAXHEAP_H | |
#include <vector> | |
#include <stdint.h> | |
// see https://stackoverflow.com/a/24748637 | |
inline int uint64_log2(uint64_t n) | |
{ | |
#define S(k) if (n >= (UINT64_C(1) << k)) { i += k; n >>= k; } |
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
class MinMaxHeap(object): | |
""" | |
Implementation of a Min-max heap following Atkinson, Sack, Santoro, and | |
Strothotte (1986): https://doi.org/10.1145/6617.6621 | |
""" | |
def __init__(self, reserve=0): | |
self.a = [None] * reserve | |
self.size = 0 | |
def __len__(self): |
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
### Keybase proof | |
I hereby claim: | |
* I am kilian-gebhardt on github. | |
* I am kiliangebhardt (https://keybase.io/kiliangebhardt) on keybase. | |
* I have a public key whose fingerprint is 469C 4086 09DE E64B 7FA2 5E6B 5997 9FB6 5043 87BD | |
To claim this, I am signing this object: |