# Path: dsenser/constants.py
# ENCODING = "utf-8"
# 
# DFLT_BROWN_PATH = os.path.join(DATA_DIR, "brown_cluster_1000.txt")
# 
# DFLT_ECONN_PATH = os.path.join(ECONN_DIR, "ExpConn.txt")
# 
# DFLT_INQUIRER_PATH = os.path.join(DATA_DIR, "inquirer_word")
# 
# DFLT_LCSI_PATH = os.path.join(DATA_DIR, "LCSInfomerge.txt")
# 
# DFLT_MPQA_PATH = os.path.join(DATA_DIR, "MPQA_Subjectivity_Lexicon.txt")
# 
# DFLT_W2V_PATH = os.path.join(DATA_DIR, "GoogleNews-vectors-negative300.bin")


from dsenser.constants import ENCODING, DFLT_BROWN_PATH, DFLT_ECONN_PATH, \
    DFLT_INQUIRER_PATH, DFLT_LCSI_PATH, DFLT_MPQA_PATH, DFLT_W2V_PATH
from dsenser.scorer.conn_head_mapper import ConnHeadMapper
from collections import defaultdict
from nltk.stem.porter import PorterStemmer
    from gensim.models.word2vec import Word2Vec
import codecs
import gc
import re
import sys
POL = "priorpolarity"
POL_IDX = 0
INTENS = "type"
INTENS_IDX = 1
POS = "pos1"
POS_IDX = 2
NEGATIONS = set(["cannot", "not", "none", "nothing",
                 "nowhere", "neither", "nor", "nobody",
                 "hardly", "scarcely", "barely", "never",
                 "n't", "noone", "havent", "hasnt",
                 "hadnt", "cant", "couldnt", "shouldnt",
                 "wont", "wouldnt", "dont", "doesnt",
                 "didnt", "isnt", "arent", "aint", "no"
                 ])


##################################################################
# Methods
def load_conns(a_fname):
    """Load explicit connectives from file.

    Args:
      a_fname (str): file containing connectives

    Returns:
      set: set of loaded connectives

    """
    ret = set()
    iconn = None

# Path: dsenser/constants.py
# ENCODING = "utf-8"
# 
# DFLT_BROWN_PATH = os.path.join(DATA_DIR, "brown_cluster_1000.txt")
# 
# DFLT_ECONN_PATH = os.path.join(ECONN_DIR, "ExpConn.txt")
# 
# DFLT_INQUIRER_PATH = os.path.join(DATA_DIR, "inquirer_word")
# 
# DFLT_LCSI_PATH = os.path.join(DATA_DIR, "LCSInfomerge.txt")
# 
# DFLT_MPQA_PATH = os.path.join(DATA_DIR, "MPQA_Subjectivity_Lexicon.txt")
# 
# DFLT_W2V_PATH = os.path.join(DATA_DIR, "GoogleNews-vectors-negative300.bin")


# Path: dsenser/resources.py
from dsenser.constants import ENCODING, DFLT_BROWN_PATH, DFLT_ECONN_PATH, \
    DFLT_INQUIRER_PATH, DFLT_LCSI_PATH, DFLT_MPQA_PATH, DFLT_W2V_PATH
from dsenser.scorer.conn_head_mapper import ConnHeadMapper
from collections import defaultdict
from nltk.stem.porter import PorterStemmer
    from gensim.models.word2vec import Word2Vec
import codecs
import gc
import re
import sys

POL = "priorpolarity"
POL_IDX = 0
INTENS = "type"
INTENS_IDX = 1
POS = "pos1"
POS_IDX = 2
NEGATIONS = set(["cannot", "not", "none", "nothing",
                 "nowhere", "neither", "nor", "nobody",
                 "hardly", "scarcely", "barely", "never",
                 "n't", "noone", "havent", "hasnt",
                 "hadnt", "cant", "couldnt", "shouldnt",
                 "wont", "wouldnt", "dont", "doesnt",
                 "didnt", "isnt", "arent", "aint", "no"
                 ])


##################################################################
# Methods
def load_conns(a_fname):
    """Load explicit connectives from file.

    Args:
      a_fname (str): file containing connectives

    Returns:
      set: set of loaded connectives

    """
    ret = set()
    iconn = None

    with codecs.open(a_fname, 'r', ENCODING,