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:
@@ -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 $
|
||||
|
||||
Reference in New Issue
Block a user