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
{ | |
"accountId": null, | |
"compute": { | |
"accelerator": "cpu", | |
"instanceSize": "small", | |
"instanceType": "c6i", | |
"scaling": { | |
"maxReplica": 1, | |
"minReplica": 1 | |
} |
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
stages: | |
foo: | |
cmd: echo '{"f1-score":0.99}' > f1.json | |
metrics: | |
- f1.json |
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
stages: | |
train: | |
cmd: >- | |
rasa data validate && | |
rasa train --fixed-model-name ./models/model --out ./ | |
params: | |
- config.yml: | |
- pipeline | |
- policies | |
deps: |
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
call plug#begin('~/.vim/plugged') | |
Plug 'jreybert/vimagit' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'tpope/vim-sensible' | |
Plug 'dracula/vim' | |
Plug 'Vimjas/vim-python-pep8-indent' | |
Plug 'chrisbra/csv.vim' | |
Plug 'scrooloose/nerdtree' |
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
# Set prefix to capslock | |
set -g prefix C-b | |
# Set defaults | |
set -s escape-time 1 | |
set -g base-index 1 | |
setw -g pane-base-index 1 |
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
# coding: utf-8 | |
import itertools | |
from itertools import groupby | |
from operator import itemgetter | |
from pprint import PrettyPrinter | |
import plac | |
from deep_reference_parser.io import read_jsonl, write_jsonl |
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
.DEFAULT_GOAL := files | |
MATCH_PATH := s3://datalabs-dev/reach-airflow/output/match_annotated_titles | |
EVAL_PATH := s3://datalabs-dev/reach-airflow/output/policy-test/evaluation/results | |
eval = evaluation-results.json | |
PRODIGY_PATH = s3://datalabs-data/reach_evaluation/data/sync | |
prodigy = 2019.10.8_valid_TITLE.jsonl \ |
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
for i in raw/*.json; | |
do | |
# Create new filename | |
filename=$(basename -- "$i") | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
new_filename=processed/refs_${filename}.txt |
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
# Need to run: | |
# python -m spacy download en | |
# from console first to get the model | |
import spacy | |
import pandas as pd | |
nlp = spacy.load("en") |
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
from spacy.util import (compile_prefix_regex, compile_infix_regex, compile_suffix_regex) | |
def _custom_tokenizer(self, nlp, regex=[r"[-/,.\n\s]"]): | |
"""Custom tokenizer to split date formats like 05-05-2015 | |
and 05/05/2015 | |
""" | |
# Use the default prefixes and suffixes | |
prefix_re = compile_prefix_regex(nlp.Defaults.prefixes) | |
suffix_re = compile_suffix_regex(nlp.Defaults.suffixes) |
NewerOlder