AutoChatbot-0.1.1
توضیحات
Package that makes chatbots automatically
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | AutoChatbot-0.1.1 |
| نام | AutoChatbot |
| نسخه کتابخانه | 0.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Kritik Seth |
| ایمیل نویسنده | sethkritik@gmail.com |
| آدرس صفحه اصلی | https://github.com/kritikseth |
| آدرس اینترنتی | https://pypi.org/project/AutoChatbot/ |
| مجوز | - |
# AutoChatBot
## Authors-
* Kritik Seth
### For documentation- either scroll down or [click here](https://kritikseth.github.io/autochatbot_docs)
## clean
### def make_train_dataset(lines, conv_lines):
```
takes input of lines and conversations, returns a list of questions and answers
:type lines: string
:param lines: path were text file of lines is present
:type conv_lines: string
:param conv_lines: path were text file of conversations is present
```
### def clean_train_dataset(text):
```
takes input list of questiond or answers, returns clean list of strings
:type text: text
:param text: list of strings
```
### def make_count_dict(q, a):
```
makes a dictionary of words
:type q: list
:param q: list of questions
:type a: list
:param a: list of answers
```
### def count_rare_words(cd, mincount):
```
counts the number of rare words
:type cd: dictionary
:param cd: count dictionary {word:key}
:type mincount: int
:param mincount: minimum length of a question
```
### def make_word_dict(cd, mincount, tokens={'':0, '':1, '':2, '':3}):
```
makes dictionary, returns mapping of word to key and key to word
:type cd: dictionary
:param cd: count dictionary {word:key}
:type mincount: int
:param mincount: min frequency of word such that it makes it into the word_dict
:type tokens: dictionary
:param tokens: default - {'<PAD>':0, '<SOS>':1, '<EOS>':2, '<UNK>':3}
```
### def add_word_tags(q, a, wd):
```
takes input of {word:key} and adds tags to those words
:type q: list
:param q: list of questions
:type a: list
:param a: list of answers
:type wd: dict
:param wd: mapping of word to key
```
### def make_line_id(q, a, wd):
```
takes input list of questions or answers and word_dict and returns text converted to id
:type q: list
:param q: list of questions
:type a: list
:param a: list of answers
:type wd: dict
:param wd: mapping of word to key
```
### def sort_line_pad(q, a, max_line_length):
```
sorts questions and answers based on their length, returns sorted list of question or answer
:type q: list
:param q: list of questions
:type a: list
:param a: list of answers
:type max_line_length: int
:param max_line_length: maximum length of question or answer
```
## chat
### def make_test_chatbot(dir_path, files_list, ntest):
```
takes input of direcotory of file, list, and number of test cases
:type lines: string
:param lines: path were text file of lines is present
:type conv_lines: string
:param conv_lines: path were text file of lines is present
:type conv_lines: string
:param conv_lines: base path were text file of lines is present
```
نیازمندی
| مقدار | نام |
|---|---|
| - | tensorflow |
| - | keras |
| - | gensim |
| - | re |
| - | numpy |
| - | tqdm |
| - | pandas |
| - | contractions |
| - | pycontractions |
| - | unicodedata |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl AutoChatbot-0.1.1:
pip install AutoChatbot-0.1.1.whl
نصب پکیج tar.gz AutoChatbot-0.1.1:
pip install AutoChatbot-0.1.1.tar.gz