def setUp(self):
     self.__simpleNormalization = SimpleNormalization()
     self.__dirPath = os.path.abspath(os.curdir)
     self.__normalizeWords = [
         "thi", "test", "file", "encod", "проверк", "определен", "кодировк",
         "фа"
     ]
Exemplo n.º 2
0
 def setUp(self):
     self.__mongoUtils = MongoSaveUtils(HOST, PORT, USR, PWD, DB, FC_N,
                                        FC_DN, MDN)
     self.__simpleNormal = SimpleNormalization()
     self.__fileSourceCustom = FileSourceCustom()
     self.__fileBlockSource = FileBlockSource()
     self.__calcMongo = CalcMongo()
     self.__mongoStatistics = MongoStatistic(self.__mongoUtils)
     self.__dirPath = os.path.abspath(os.curdir)
 def setUp(self):
     self.__dirPath = os.path.abspath(os.curdir)
     firstPath = os.path.join(self.__dirPath, "resources/first")
     secondPath = os.path.join(self.__dirPath, "resources/second")
     self.__mongoSaveUtils = MongoSaveRetrievalUtils(
         HOST, PORT, USR, PWD, DB, FC_N, FC_DN, MDN)
     self.__mongoReadUtils = MongoReadUtils(HOST, PORT, USR, PWD, DB, FC_N,
                                            FC_DN)
     self.__simN = SimpleNormalization()
     self.__simNamesN = FileNameNormalization()
     self.__ms = StatisticFactory().createStatistic(MONGO_TYPE,
                                                    self.__mongoSaveUtils)
     self.__scc = FSSourceCustomCallback()
     self.__rnFS = ReaderNameFS([firstPath, secondPath])
Exemplo n.º 4
0
 def setUp(self):
     self.__dirPath = os.path.abspath(os.curdir)
     firstPath = os.path.join(self.__dirPath, "resources/first")
     secondPath = os.path.join(self.__dirPath, "resources/second")
     self.__mongoUtils = MongoSaveRetrievalUtils(HOST, PORT, USR, PWD, DB,
                                                 FC_N, FC_DN, MDN)
     self.__mongoUtilsTypeError = MongoSaveUtils(HOST, PORT, USR, PWD, DB,
                                                 FC_N, FC_DN, MDN)
     self.__mongoReadUtils = MongoReadUtils(HOST, PORT, USR, PWD, DB, FC_N,
                                            FC_DN)
     self.__smN = SimpleNormalization()
     self.__scc = FSSourceCustomCallback()
     self.__rFS = ReaderNameFS([firstPath, secondPath])
     self.__fsWorker = DataSourceWorkerFS()
Exemplo n.º 5
0
 def testParseQ(self):
     smN = SimpleNormalization()
     parseList = self.spq.parseQ("testing q q q q testing", None, smN)
     self.assertEqual(parseList[0], TYPE_Q_FULL)
     self.assertListEqual(parseList[1], ["test", "q"])