thomasw21
commited on
Commit
·
113d6ab
1
Parent(s):
8bf249a
missing
Browse files
pmd.py
CHANGED
|
@@ -656,9 +656,10 @@ class YFCC100MLoader(BaseLoaderWithDLManager):
|
|
| 656 |
|
| 657 |
def clean_text(self, text: str) -> str:
|
| 658 |
"""Inspired from original code"""
|
| 659 |
-
|
| 660 |
-
|
| 661 |
-
|
|
|
|
| 662 |
|
| 663 |
def get_associated_text(self, annotation: Dict[str, Any]) -> Optional[str]:
|
| 664 |
"""
|
|
|
|
| 656 |
|
| 657 |
def clean_text(self, text: str) -> str:
|
| 658 |
"""Inspired from original code"""
|
| 659 |
+
cleaned_text = unquote_plus(text)
|
| 660 |
+
cleaned_text = self.LINE_BREAK_REGEX.sub(" ", cleaned_text)
|
| 661 |
+
cleaned_text = self.REMOVE_HTML_TAGS_REGEX.sub("", cleaned_text)
|
| 662 |
+
return cleaned_text
|
| 663 |
|
| 664 |
def get_associated_text(self, annotation: Dict[str, Any]) -> Optional[str]:
|
| 665 |
"""
|