Spaces:
Running
Running
Update app.py
Browse files
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:
|