cfg = __import__(config_name, fromlist=['']) if cfg.DEBUG is True: logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) log.info(args.config+" has been load as configuration") else: logging.disable(logging.NOTSET) collection = EmailCollection() collection.add_from_directory(cfg.PATH) if hasattr(cfg,"LANG"): collection.keep_lang("fr") engine = Clusterizer(collection) engine.vectorizer = getattr(cfg,"VECTORIZER", LogicVectorizer()) engine.algorithm = getattr(cfg,"ALGORITHM", HierarchicalAlgo()) engine.algorithm.n_clusters = getattr(cfg,"N_CLUSTERS", 3) engine.target = getattr(cfg,"TARGET", "both") if getattr(cfg,"ENABLE_TEST", False):