kisejin commited on
Commit
3611007
·
verified ·
1 Parent(s): 44399fe

Update BERTopic/my_topic_modeling.py

Browse files
Files changed (1) hide show
  1. BERTopic/my_topic_modeling.py +10 -1
BERTopic/my_topic_modeling.py CHANGED
@@ -171,6 +171,15 @@ def init_args():
171
  required=True,
172
  help="Only train both models for calculating coherence score.",
173
  )
 
 
 
 
 
 
 
 
 
174
 
175
  args = parser.parse_args()
176
 
@@ -559,7 +568,7 @@ def working(args: argparse.Namespace, name_dataset: str):
559
 
560
  # ****** 2
561
  # Get reduce topics and topic over time for each n_topics
562
- if args.need_reduce_n_tops == 'yes':
563
  fandc_logger.log(logging.INFO, f'Staring reduce topics and topic over time from 10 to 50...')
564
  for n_topics in [10,20,30,40,50]:
565
  topic_model_copy = copy.deepcopy(topic_model)
 
171
  required=True,
172
  help="Only train both models for calculating coherence score.",
173
  )
174
+
175
+ parser.add_argument(
176
+ "--need_reduce_n_topics",
177
+ default="yes",
178
+ type=str,
179
+ required=True,
180
+ help="Need reduce n topics and show topic modeling over timestamp with this.",
181
+ )
182
+
183
 
184
  args = parser.parse_args()
185
 
 
568
 
569
  # ****** 2
570
  # Get reduce topics and topic over time for each n_topics
571
+ if args.need_reduce_n_topics == 'yes':
572
  fandc_logger.log(logging.INFO, f'Staring reduce topics and topic over time from 10 to 50...')
573
  for n_topics in [10,20,30,40,50]:
574
  topic_model_copy = copy.deepcopy(topic_model)