# Path: corpkit/constants.py
# PYTHON_VERSION = sys.version_info.major
# 
# STRINGTYPE = str if PYTHON_VERSION == 3 else basestring


import math
import os
        import os
        import pandas as pd
        import pandas as pd
    import os
from nltk import ngrams, sent_tokenize, word_tokenize
from corpkit.constants import PYTHON_VERSION, STRINGTYPE
        from collections import Counter
        from corpkit.other import load
        from collections import Counter, OrderedDict
        from corpkit.corpus import Subcorpus, File
    from pandas import DataFrame, Series
    from corpkit.other import load
        from corpkit.other import save

class MultiModel(dict):
    
    def __init__(self, data, order, name='', **kwargs):
        if isinstance(data, STRINGTYPE):
            name = data
            if not name.endswith('.p'):
                name = name + '.p'
        self.name = name
        self.order = order
        self.kwargs = kwargs
        if os.path.isfile(self.name):
            data = load(self.name, loaddir='models')
        else:
            pth = os.path.join('models', self.name)
            if os.path.isfile(pth):
                data = load(self.name, loaddir='models')
        super(MultiModel, self).__init__(data)

    def score(self, data, **kwargs):
        """
        Score text against a model
        """
        # get data into a list of ngram tuples
        # get subcorpus
        if isinstance(data, Subcorpus):
            counts = self[data.name].counts
        elif isinstance(data, STRINGTYPE) and data in self.keys():
            counts = self[data].counts 
        #get file

# Path: corpkit/constants.py
# PYTHON_VERSION = sys.version_info.major
# 
# STRINGTYPE = str if PYTHON_VERSION == 3 else basestring


# Path: corpkit/model.py
import math
import os
        import os
        import pandas as pd
        import pandas as pd
    import os
from nltk import ngrams, sent_tokenize, word_tokenize
from corpkit.constants import PYTHON_VERSION, STRINGTYPE
        from collections import Counter
        from corpkit.other import load
        from collections import Counter, OrderedDict
        from corpkit.corpus import Subcorpus, File
    from pandas import DataFrame, Series
    from corpkit.other import load
        from corpkit.other import save


class MultiModel(dict):
    
    def __init__(self, data, order, name='', **kwargs):
        if isinstance(data, STRINGTYPE):
            name = data
            if not name.endswith('.p'):
                name = name + '.p'
        self.name = name
        self.order = order
        self.kwargs = kwargs
        if os.path.isfile(self.name):
            data = load(self.name, loaddir='models')
        else:
            pth = os.path.join('models', self.name)
            if os.path.isfile(pth):
                data = load(self.name, loaddir='models')
        super(MultiModel, self).__init__(data)

    def score(self, data, **kwargs):
        """
        Score text against a model
        """
        # get data into a list of ngram tuples
        # get subcorpus
        if isinstance(data, Subcorpus):
            counts = self[data.name].counts
        elif isinstance(data, STRINGTYPE) and data in self.keys():
            counts = self[data].counts 
        #get file

        elif isinstance(data, File) or (isinstance(data, STRINGTYPE) and \