Update: 初学记、佩文韵府 and 五车韵瑞
This commit is contained in:
5
佩文韵府/test_empty_word.py
Normal file
5
佩文韵府/test_empty_word.py
Normal file
@@ -0,0 +1,5 @@
|
||||
import re
|
||||
text = "對語〈渭北 江東〉〈 平北 安東〉摘句〈力障百川東〉"
|
||||
tokens = re.findall(r"([^〈〉]*)((?:〈[^〉]+〉)+)", text)
|
||||
for i, (word, desc_blocks) in enumerate(tokens):
|
||||
print(f"Token {i}: WORD='{word}' DESCS={desc_blocks}")
|
||||
Reference in New Issue
Block a user