1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-06-06 05:51:17 +08:00

Fix Chinese punctuation regex comment (#1012)

This commit is contained in:
Chaoying
2022-03-29 09:16:21 +08:00
committed by GitHub
parent 5200ff520a
commit 3c4f4bfd44

View File

@@ -271,7 +271,11 @@ def parse_field(field):
if not isinstance(field, str):
field = str(field)
# Chinese Punctuation Regex: \nff08 = (, \nff09 = ), \nff1a = :, \n3001 = 。
# Chinese punctuation regex:
# \u3001 -> 、
# \uff1a ->
# \uff08 -> (
# \uff09 -> )
chinese_punctuation_regex = r"\u3001\uff1a\uff08\uff09"
for pattern, new in [
(rf"\$\$([\w{chinese_punctuation_regex}]+)", r'PFeature("\1")'), # $$ must be before $