# 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
    def load(self):
        """Force loading the resource.

        Note:
          loads the resource

        """
        if self.resource is None:
            self.resource = self.cmd(*self.args, **self.kwargs)
        return self.resource

    def unload(self):
        """Unload the resource.

        Note:
           unloads the resource

        """
        if self.resource is not None:
            print("Unloading resource '{:s}'...".format(repr(self.resource)),
                  file=sys.stderr)
            del self.resource
            self.resource = None
            gc.collect()


##################################################################
# Resources
LCSI = load_LCSI(DFLT_LCSI_PATH)
BROWN_CLUSTERS = LoadOnDemand(load_BROWN, DFLT_BROWN_PATH)

# 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

    def load(self):
        """Force loading the resource.

        Note:
          loads the resource

        """
        if self.resource is None:
            self.resource = self.cmd(*self.args, **self.kwargs)
        return self.resource

    def unload(self):
        """Unload the resource.

        Note:
           unloads the resource

        """
        if self.resource is not None:
            print("Unloading resource '{:s}'...".format(repr(self.resource)),
                  file=sys.stderr)
            del self.resource
            self.resource = None
            gc.collect()


##################################################################
# Resources
LCSI = load_LCSI(DFLT_LCSI_PATH)
BROWN_CLUSTERS = LoadOnDemand(load_BROWN, DFLT_BROWN_PATH)

CONNS = load_conns(DFLT_ECONN_PATH)