File size: 505 Bytes
bccd6e8
 
 
 
 
 
 
 
3134951
bccd6e8
3134951
bccd6e8
 
fac3e4e
bccd6e8
fac3e4e
bccd6e8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Prep utils and data."""
# pylint: disable=invalid-name
from pathlib import Path

from logzero import logger

data_dir = Path(__file__).with_name("data")
try:
    text1 = Path(data_dir, "test-en.txt").read_text(encoding="utf8")
except Exception as exc:
    logger.error("rea text1 error: %s, setting to ''", exc)
    text1 = ""
try:
    text2 = Path(data_dir, "test-zh.txt").read_text(encoding="utf8")
except Exception as exc:
    logger.error("read text2 error: %s, setting to ''", exc)
    text2 = ""