MCPcopy Index your code
hub / github.com/THUDM/GLM / punctuation_standardization

Function punctuation_standardization

data_utils/corpora.py:31–35  ·  view source on GitHub ↗
(string: str)

Source from the content-addressed store, hash-verified

29
30
31def punctuation_standardization(string: str):
32 punctuation_dict = {"\u201c": "\"", "\u201d": "\"", "\u2019": "'", "\u2018": "'", "\u2013": "-"}
33 for key, value in punctuation_dict.items():
34 string = string.replace(key, value)
35 return string
36
37
38class KeyDataset(data.Dataset):

Callers 15

_create_examplesMethod · 0.90
_create_examplesMethod · 0.90
_create_examplesMethod · 0.90
_create_examplesMethod · 0.90
encodeMethod · 0.90
_create_examplesMethod · 0.90
_create_examplesMethod · 0.90
_create_examplesMethod · 0.90
_create_examplesMethod · 0.90
_create_examplesMethod · 0.90
_create_examplesMethod · 0.90
_create_examplesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected