This file contains 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 numpy as np | |
#from scipy.special import chdtrc | |
from scipy.sparse import spdiags | |
from sklearn.base import BaseEstimator, TransformerMixin | |
from sklearn.preprocessing import LabelBinarizer | |
def _chisquare(f_obs, f_exp, reduce): | |
"""Replacement for scipy.stats.chisquare with custom reduction. |
This file contains 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/sh | |
# Usage: git-detach <directory> <target> | |
# Creates a new Git repository at <target> from the contents of <directory> | |
# and its history. Does not remove the directory from its original repo. | |
# | |
# E.g.: suppose project/ is a Git repository with a subdirectory lib/, then | |
# git-detach project/lib/ standalone-lib/ | |
# creates a new repository standalone-lib/ holding the contents of project/lib/ | |
# as a separate repo. |
This file contains 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
# Quick and dirty Brat-to-CSV conversion. | |
from __future__ import print_function | |
import csv | |
import io | |
import re | |
import sys | |
# copy server/src/{gtbtokenize,tokenise}.py from Brat | |
from tokenise import gtb_token_boundary_gen |
OlderNewer