<commit_before>from __future__ import unicode_literals
import atexit
import logging
import pickle
import re
import MySQLdb
import sys
import os

import requests

sys.path.append(os.path.abspath(os.path.dirname(__file__) + '../..'))
from config.config import go_conn as db
from config import config
from text.entity import Entity
from text.token2 import Token2

__author__ = 'Andre'
prot_words = set()
prot_stopwords = set(["chromosome", "factor", "conserved", "gene", "anti", "mir", "regulatory", "terminal", "element",
                      "activator", "cell", "box", "transcriptional", "transcription", "growth", "talk", "epithelial",
                      "alpha", "microrna", "micrornas", "chip", "chipseq", "interferons", "tweak", "allele", "mirnas",
                      "mirs", "protein", "proteins", "hsa", "genotype", "mRNA"])
# words that may seem like they are not part of named chemical entities but they are

# words that are never part of chemical entities
with open(config.stoplist, 'r') as stopfile:
    for l in stopfile:<commit_msg>Prevent unnecessary import of go_conn<commit_after>from __future__ import unicode_literals
import atexit
import logging
import pickle
import re
import MySQLdb
import sys
import os

import requests

sys.path.append(os.path.abspath(os.path.dirname(__file__) + '../..'))
from config.config import use_go
if use_go:
    from config.config import go_conn as db
from config import config
from text.entity import Entity
from text.token2 import Token2

__author__ = 'Andre'
prot_words = set()
prot_stopwords = set(["chromosome", "factor", "conserved", "gene", "anti", "mir", "regulatory", "terminal", "element",
                      "activator", "cell", "box", "transcriptional", "transcription", "growth", "talk", "epithelial",
                      "alpha", "microrna", "micrornas", "chip", "chipseq", "interferons", "tweak", "allele", "mirnas",
                      "mirs", "protein", "proteins", "hsa", "genotype", "mRNA"])
# words that may seem like they are not part of named chemical entities but they are

# words that are never part of chemical entities
with open(config.stoplist, 'r') as stopfile:
    for l in stopfile:
{'fraction_non_alphanumeric': 0.13143382352941177, 'fraction_numerical': 0.001838235294117647, 'mean_word_length': 4.134433962264151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4121149', 'n_tokens_mistral': 676, 'n_tokens_neox': 637, 'n_words': 227}