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
def weighted_log_loss(yt, yp): | |
'''Log loss that weights false positives or false negatives more. | |
Punish the false negatives if you care about making sure all the neurons | |
are found and don't mind some false positives. Vice versa for punishing | |
the false positives. Concept taken from the UNet paper where they | |
weighted boundary errors to get cleaner boundaries.''' | |
emphasis = 'fn' | |
assert emphasis in ['fn', 'fp'] | |
m = 2 |
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
# A python script to turn annotated data in standoff format (brat annotation tool) to the formats expected by Stanford NER and Relation Extractor models | |
# - NER format based on: http://nlp.stanford.edu/software/crf-faq.html#a | |
# - RE format based on: http://nlp.stanford.edu/software/relationExtractor.html#training | |
# Usage: | |
# 1) Install the pycorenlp package | |
# 2) Run CoreNLP server (change CORENLP_SERVER_ADDRESS if needed) | |
# 3) Place .ann and .txt files from brat in the location specified in DATA_DIRECTORY | |
# 4) Run this script |
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
pcm.frontroute { | |
type route | |
slave.pcm "dmix:USB" | |
ttable.0.0 1 | |
ttable.1.1 1 | |
} | |
pcm.frontusb { | |
type plug | |
slave.pcm "frontroute" | |
hint { |
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
i | |
me | |
my | |
myself | |
we | |
our | |
ours | |
ourselves | |
you | |
your |