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 grobid/grobid:0.7.2 | |
RUN apt-get update && \ | |
apt-get install openjdk-8-jdk -y --no-install-recommends && \ | |
apt-get autoremove -y --purge && \ | |
apt-get clean -y && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ | |
rm -f /etc/legal /etc/motd | |
WORKDIR / |
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 cmudict # for syllables | |
import syllables | |
import re | |
whitespace = re.compile(r'[\s,.?!/=();]+') | |
cmudict_cached = cmudict.dict() | |
def lookup_word(word_s): |
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 os, sys | |
sys.path.append(os.getcwd()) | |
import time | |
import matplotlib | |
matplotlib.use('Agg') | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import sklearn.datasets |