cnmoro commited on
Commit
43cbfbd
1 Parent(s): 62fdd41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -30,6 +30,9 @@ def generate_combinations(text, word_reduction_factor, stopwords, semantic_embed
30
  if keep_tokens is None:
31
  keep_tokens = {"\n", ".", ",", ";", "!", "?"}
32
 
 
 
 
33
  words = text.split()
34
  total_words = len(words)
35
  num_remove = int(total_words * word_reduction_factor)
 
30
  if keep_tokens is None:
31
  keep_tokens = {"\n", ".", ",", ";", "!", "?"}
32
 
33
+ if word_reduction_factor is None:
34
+ word_reduction_factor = 0.5
35
+
36
  words = text.split()
37
  total_words = len(words)
38
  num_remove = int(total_words * word_reduction_factor)