openfree commited on
Commit
b0a9a13
Β·
verified Β·
1 Parent(s): 7cd383c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -184,6 +184,18 @@ class ContentDeduplicator:
184
  def get_used_elements(self) -> List[str]:
185
  """μ‚¬μš©λœ 핡심 μš”μ†Œ λ°˜ν™˜"""
186
  return list(self.seen_key_phrases)[:10] # 졜근 10개
 
 
 
 
 
 
 
 
 
 
 
 
187
 
188
 
189
  class ProgressionMonitor:
 
184
  def get_used_elements(self) -> List[str]:
185
  """μ‚¬μš©λœ 핡심 μš”μ†Œ λ°˜ν™˜"""
186
  return list(self.seen_key_phrases)[:10] # 졜근 10개
187
+
188
+ def count_repetitions(self, content: str) -> int:
189
+ """ν…μŠ€νŠΈ λ‚΄μ˜ 반볡 횟수 계산"""
190
+ paragraphs = content.split('\n\n')
191
+ repetitions = 0
192
+
193
+ for i, para1 in enumerate(paragraphs):
194
+ for para2 in paragraphs[i+1:]:
195
+ if self.check_similarity(para1, para2) > 0.7:
196
+ repetitions += 1
197
+
198
+ return repetitions
199
 
200
 
201
  class ProgressionMonitor: