nonebot2/commands/natural_language.py

13 lines
299 B
Python
Raw Normal View History

2017-01-01 15:16:34 +00:00
import jieba
from command import CommandRegistry
__registry__ = cr = CommandRegistry()
@cr.register('process')
@cr.restrict(full_command_only=True)
def process(args_text, ctx_msg, internal=False):
print('自然语言消息处理', args_text)
print(list(jieba.cut_for_search(args_text)))