Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Duplicated from
chinese-enthusiasts/chinese-idioms
chinese-enthusiasts
/
idiom-finder
like
0
Running
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
idiom-finder
/
tests
/
test_utils.py
Mel Seto
Add verification module that verifies LLM results using CcCEdict and Wikitionary
456f698
about 2 months ago
raw
Copy download link
history
blame
contribute
delete
Safe
336 Bytes
import
pytest
from
utils
import
utils
@pytest.mark.parametrize(
"text, expected"
,
[
(
"举棋不定"
,
"jǔ qí bù dìng"
),
(
"风"
,
"fēng"
),
(
"不怕慢,就怕站"
,
"bù pà màn , jiù pà zhàn"
),
],
)
def
test_get_pinyin_accent
(
text, expected
):
assert
utils.get_pinyin(text) == expected