Update BERTopic/my_topic_modeling.py
Browse files
BERTopic/my_topic_modeling.py
CHANGED
|
@@ -414,6 +414,7 @@ def coherence_score(topic_model, df_documents):
|
|
| 414 |
|
| 415 |
def working(args: argparse.Namespace, name_dataset: str):
|
| 416 |
|
|
|
|
| 417 |
############# Create logger##################################
|
| 418 |
fandc_logger = create_logger_file_and_console()
|
| 419 |
file_logger = create_logger_file()
|
|
@@ -421,6 +422,7 @@ def working(args: argparse.Namespace, name_dataset: str):
|
|
| 421 |
##############################################################
|
| 422 |
|
| 423 |
######### Create dataframe for dataset booking and tripadvisor #####
|
|
|
|
| 424 |
fandc_logger.log(logging.INFO, f'Get data from {name_dataset}')
|
| 425 |
doc_source = f'en_{name_dataset}.csv'
|
| 426 |
list_tmp = prepare_data(doc_source, doc_type, type_framework = 'pandas')
|
|
@@ -585,7 +587,7 @@ def working(args: argparse.Namespace, name_dataset: str):
|
|
| 585 |
|
| 586 |
fandc_logger.log(logging.INFO, f'Save topics reduce and topic over time for {name_dataset} dataset successfully!')
|
| 587 |
###################################
|
| 588 |
-
|
| 589 |
|
| 590 |
|
| 591 |
|
|
|
|
| 414 |
|
| 415 |
def working(args: argparse.Namespace, name_dataset: str):
|
| 416 |
|
| 417 |
+
|
| 418 |
############# Create logger##################################
|
| 419 |
fandc_logger = create_logger_file_and_console()
|
| 420 |
file_logger = create_logger_file()
|
|
|
|
| 422 |
##############################################################
|
| 423 |
|
| 424 |
######### Create dataframe for dataset booking and tripadvisor #####
|
| 425 |
+
fandc_logger.log(logging.INFO, f'STARTING WITH TOPIC MODEL FOR {name_dataset} dataset')
|
| 426 |
fandc_logger.log(logging.INFO, f'Get data from {name_dataset}')
|
| 427 |
doc_source = f'en_{name_dataset}.csv'
|
| 428 |
list_tmp = prepare_data(doc_source, doc_type, type_framework = 'pandas')
|
|
|
|
| 587 |
|
| 588 |
fandc_logger.log(logging.INFO, f'Save topics reduce and topic over time for {name_dataset} dataset successfully!')
|
| 589 |
###################################
|
| 590 |
+
fandc_logger.log(logging.INFO, f'ENDING TRAINING TOPIC MODELING {name_dataset} dataset\n')
|
| 591 |
|
| 592 |
|
| 593 |
|