(source: str, target: str, threshold: float, ignore_stopwords: bool = False, ignore_entities: bool = False)
| 112 | return overlap, (len(overlap) / len(target_words)) if overlap else 0, (len(overlap) / len(source_words)) if overlap else 0 |
| 113 | |
| 114 | def has_overlap(source: str, target: str, threshold: float, ignore_stopwords: bool = False, ignore_entities: bool = False): |
| 115 | _, overlap_level1, overlap_level2 = get_overlap(source, target, ignore_stopwords=ignore_stopwords, ignore_entities=ignore_entities) |
| 116 | return overlap_level1 > threshold or overlap_level2 > threshold |
| 117 | |
| 118 | def has_story_overlap(head: str, tail: str, story: str, threshold: float, selected_context: str = None, dim: int = 1, |
| 119 | ignore_stopwords: bool = False, ignore_entities: bool = False) -> bool: |
no test coverage detected