Пример #1
0
 def __init__(self, force_build=False):
     self.viz = None
     self.html = None
     self.K = None
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     super().__init__(force_build, **self.pickle_kwargs)
Пример #2
0
 def __init__(self, force_build = False):
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     self.dictionary = None
     self.corpus_ = None
     self.make_bow_args = {'no_below':20, 'no_above':0.5}
     super(BOWFeature, self).__init__(force_build, **self.pickle_kwargs)
Пример #3
0
 def __init__(self, force_build=False):
     self.pipeline_steps = None
     self.corpus_ = None
     self.phrases = None
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     super(Preprocessor, self).__init__(force_build, **self.pickle_kwargs)
Пример #4
0
 def __init__(self, force_build=False):
     self.corpus_ = None
     self.tfid_args = {
     }
     self.dictionary = None
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     super(TFIDFeature, self).__init__(force_build, **self.pickle_kwargs)
Пример #5
0
 def __init__(self, force_build=False):
     self.model = None
     self.lda_args = {
         'chunksize': 2000,
         'alpha' : 'auto',
         'eta': 'auto',
         'iterations' : 50,
         'num_topics' : 10,
         'passes' : 20,
         'eval_every' : None,
         # 'workers' : 3,
     }
     pd = PickleDef(self)
     super(LDAModel, self).__init__(force_build, **pd())
Пример #6
0
 def __init__(self, file=None):
     # defines allowed extensions
     self.allowed_extensions = ['txt', 'csv']
     self.data_dir = DATA_DIR
     self.read_dfs = {}
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     super(Read, self).__init__(**self.pickle_kwargs)
     # logic to read in new files
     if file:
         if type(file) == list:
             for f in file:
                 if f in self.read_dfs:
                     print(f'{f} already has been read \n skipping {f}')
                     pass
                 else:
                     self.__readFilesDataFrames(file)
         else:
             if file in self.read_dfs:
                 print(f'{file} already has been read \n using loaded object')
             else:
                 self.__readFilesDataFrames(file)
Пример #7
0
 def __init__(self):
     self.corpus_ = None
     self.dictionary = None
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     super().__init__(**self.pickle_kwargs)
Пример #8
0
 def __init__(self):
     self.model = None
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     super().__init__(**self.pickle_kwargs)
Пример #9
0
 def __init__(self, force_build=False):
     self.model = None
     self.gsdmm_args = {'K': 10, 'alpha': 0.1, 'beta': 0.1, 'n_iters': 30}
     pd = PickleDef(self)
     super(GSDMM, self).__init__(force_build, **pd())
Пример #10
0
 def __init__(self):
     self.phrase_model = None
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     super(PhraseModel, self).__init__(**self.pickle_kwargs)
Пример #11
0
 def __init__(self, force_build=False):
     self.corpus_ = None
     self.dictionary = None
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     super().__init__(force_build, **self.pickle_kwargs)
Пример #12
0
 def __init__(self):
     self.df_train = None
     self.models = None
     pd = PickleDef(self)
     super().__init__(**pd())
Пример #13
0
 def __init__(self, force_build=False):
     LDAModel.__init__(self)
     pd = PickleDef(self)
     Picklable.__init__(self, force_build, **pd())
Пример #14
0
 def __init__(self):
     pd = PickleDef(self)
     self.pickle_kwargs = pd()
     super(Ngramer, self).__init__(**self.pickle_kwargs)