-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
073cab5
commit 6fbc87b
Showing
3 changed files
with
44 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,43 @@ | ||
from enum import Enum | ||
from pickle import GLOBAL | ||
from zhenxun.configs.path_config import DATA_PATH | ||
|
||
data_dir = DATA_PATH / "word_bank" | ||
data_dir.mkdir(parents=True, exist_ok=True) | ||
|
||
class ScopeType(Enum): | ||
""" | ||
全局、群聊、私聊 | ||
""" | ||
GLOBAL = 0 | ||
GROUP = 1 | ||
PRIVATE = 2 | ||
|
||
scope2int = { | ||
"全局": 0, | ||
"群聊": 1, | ||
"私聊": 2, | ||
"全局": ScopeType.GLOBAL, | ||
"群聊": ScopeType.GROUP, | ||
"私聊": ScopeType.PRIVATE, | ||
} | ||
|
||
class WordType(Enum): | ||
""" | ||
精准、模糊、正则、图片 | ||
""" | ||
EXACT = 0 | ||
FUZZY = 1 | ||
REGEX = 2 | ||
IMAGE = 3 | ||
|
||
type2int = { | ||
"精准": 0, | ||
"模糊": 1, | ||
"正则": 2, | ||
"图片": 3, | ||
"精准": WordType.EXACT, | ||
"模糊": WordType.FUZZY, | ||
"正则": WordType.REGEX, | ||
"图片": WordType.IMAGE, | ||
} | ||
|
||
int2type = { | ||
0: "精准", | ||
1: "模糊", | ||
2: "正则", | ||
3: "图片", | ||
WordType.EXACT: "精准", | ||
WordType.FUZZY: "模糊", | ||
WordType.REGEX: "正则", | ||
WordType.IMAGE: "图片", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters