Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Qiware/aibot
/ functions
Functions
64 in github.com/Qiware/aibot
⨍
Functions
64
◇
Types & classes
12
↓ 6 callers
Method
simhash
(self, tokens)
storage/simhash.py:16
↓ 4 callers
Method
find
(self, text)
storage/storage.py:212
↓ 3 callers
Method
add
(self, text, resp)
storage/storage.py:103
↓ 3 callers
Method
get_response
(self, text)
chatbot.py:14
↓ 2 callers
Method
find_from_conversation_dict
(self, hash_val)
storage/storage.py:118
↓ 2 callers
Method
gen_key_list
功能描述: 生成关键字列表. 注意事项: 列表中关键字越来越短, 因此越靠前匹配出来的结果可靠性越高.
storage/storage.py:30
↓ 1 callers
Method
_string_hash
(self, source)
storage/simhash.py:48
↓ 1 callers
Method
add_response
Add the response to the list if it does not already exist.
conversation/statement.py:46
↓ 1 callers
Method
chat_handler
请求报体: {"uid":123456, roomid=1000000015, "gid":5, "text":"你好"} 应答报体: {"uid":123456, roomid=1000000015, "gid":5, "text":"你好, 有事吗?"}
main.py:32
↓ 1 callers
Method
dump
(self)
chatbot.py:30
↓ 1 callers
Method
find_from_reverse_dict
功能描述: 当词的所占权重低于平均权重的20%时, 不对其构建索引, 也不对其进行搜索. 参数列表: @hash_val: 文本text的SIM哈希值 @text: 聊天文本
storage/storage.py:129
↓ 1 callers
Method
get_file_path
Reads a dotted file path and returns the file path.
corpus/corpus.py:9
↓ 1 callers
Method
insert_into_conversation_dict
功能描述: 插入对话词典 参数列表: @hash: 文本text的哈希值 @text: 文本text @resp: 文本text对应的应答 注意事项: 对话词典以文本text的哈
storage/storage.py:57
↓ 1 callers
Method
insert_into_reverse_dict
功能描述: 插入倒排词典 参数列表: @hash: 文本text的哈希值 @text: 文本text 注意事项: 当词的所占权重低于平均权重的20%时, 不对其构建索引, 也不对其进行搜索.
storage/storage.py:69
↓ 1 callers
Method
list_corpus_files
Return a list of file paths to each data file in the specified corpus.
corpus/corpus.py:36
↓ 1 callers
Method
load_corpus
Return the data contained within a specified corpus.
corpus/corpus.py:55
↓ 1 callers
Function
load_userdict
()
train.py:6
↓ 1 callers
Function
load_userdict
Load user dictionary
main.py:16
↓ 1 callers
Method
read_corpus
Read and return the data from a corpus json file.
corpus/corpus.py:25
↓ 1 callers
Method
remove
(self, key)
storage/reversedict.py:60
↓ 1 callers
Method
train
(self, dot_path)
chatbot.py:17
Method
__eq__
(self, other)
conversation/response.py:16
Method
__eq__
(self, other)
conversation/statement.py:28
Method
__init__
(self, name)
chatbot.py:10
Method
__init__
(self, text, **kwargs)
conversation/response.py:6
Method
__init__
(self, text, **kwargs)
conversation/statement.py:11
Method
__init__
(self, value='Recieved an unexpected value type.')
conversation/statement.py:108
Method
__init__
(self)
storage/storage.py:15
Method
__init__
(self, weight, text)
storage/reversedict.py:9
Method
__init__
(self)
storage/reversedict.py:14
Method
__init__
(self)
storage/conversationdict.py:9
Method
__init__
(self, tokens='', hashbits=128)
storage/simhash.py:7
Method
__init__
(self)
storage/simhashdict.py:10
Method
__init__
(self)
corpus/corpus.py:5
Method
__repr__
(self)
conversation/response.py:13
Method
__repr__
(self)
conversation/statement.py:25
Method
__str__
(self)
conversation/response.py:10
Method
__str__
(self)
conversation/statement.py:22
Method
__str__
(self)
conversation/statement.py:111
Method
__str__
(self)
storage/simhash.py:12
Method
add
(self, key, weight, text)
storage/reversedict.py:33
Method
add
(self, hash_val, req_text, rsp_text)
storage/conversationdict.py:28
Method
add
(self, text)
storage/simhashdict.py:29
Method
add_extra_data
This method allows additional data to be stored on the statement object.
conversation/statement.py:38
Method
do_GET
(self)
main.py:79
Method
do_POST
(self)
main.py:85
Method
dump
(self)
storage/storage.py:22
Method
dump
(self)
storage/reversedict.py:25
Method
dump
(self)
storage/conversationdict.py:20
Method
dump
(self)
storage/simhashdict.py:21
Method
find
(self, key)
storage/reversedict.py:57
Method
find
(self, hash_val)
storage/conversationdict.py:38
Method
find
(self, text)
storage/simhashdict.py:47
Method
get_response_count
Return the number of times the statement occurs in the database.
conversation/statement.py:80
Method
hamming_distance
(self, other)
storage/simhash.py:32
Method
printx
(self)
chatbot.py:35
Method
printx
(self)
storage/storage.py:27
Method
printx
(self)
storage/conversationdict.py:41
Method
remove
(self, hash_val)
storage/conversationdict.py:47
Method
remove
(self, text)
storage/simhashdict.py:51
Method
remove_response
Removes a response from the statement's response list based on the value of the response text.
conversation/statement.py:68
Method
serialize
(self)
conversation/response.py:25
Method
serialize
Returns a dictionary representation of the current object.
conversation/statement.py:91
Method
similarity
(self, other)
storage/simhash.py:41