Spaces:
Runtime error
Runtime error
fix: missing encoding definition
Browse files- examples/common.py +1 -1
examples/common.py
CHANGED
@@ -10,7 +10,7 @@ NLP: Language = spacy.load("hu_core_news_trf")
|
|
10 |
|
11 |
def _compute_idf(freq_file: Path) -> Dict[str, float]:
|
12 |
freqs: Dict[str, int] = {}
|
13 |
-
with freq_file.open() as f:
|
14 |
for line in f:
|
15 |
line = line.strip()
|
16 |
data: List[str] = line.split()
|
|
|
10 |
|
11 |
def _compute_idf(freq_file: Path) -> Dict[str, float]:
|
12 |
freqs: Dict[str, int] = {}
|
13 |
+
with freq_file.open(encoding="utf-8") as f:
|
14 |
for line in f:
|
15 |
line = line.strip()
|
16 |
data: List[str] = line.split()
|