![]() ![]() Pickle is used throughout the stages except the data importing stage and the GUI development stage. Json is also used implicitly throughout the program as the fundamental data in chatbot - conversation patterns.Ĭlass “pickle” is to make the data operations more efficient by removing object hierarchy when dumping our data or when loading our data from the dataset as it converts/treats the data as a single stream. It is used for importing and loading data, preprocessing data, and getting random responses for the GUI. The fourth method, “rpus”, is used to access “wordnet” which helps us to implement a new feature that we added to this code - synonym recognition.Ĭlass “json” is the data file which predicts the user inputs and gives responses. We will explain Stanford Corenlp later.Ĥ. It is used for one of the new features we added - POS tagging - and it works in the similar pattern as Stanford Corenlp’s POS tagging. The third method, “nltk.pos_tag”, tags every word as “Proper Nouns”, “Verb”, “Adjectives” etc. ![]() The second method, “nltk.word_tokenize”, is used to cleanup and break the whole text into small parts, such as words.ģ. The first method, “”, converts a word into its lemma form, groups different words to be analyzed as a single item based on similar meaning, and then creates a pickle file to store the Python objects which we will use while predicting.Ģ. There are 4 critical methods within this class: “”, “nltk.word_tokenize”, “nltk.pos_tag” (instead of Stanfordnlp’s POS tagging to simplify the implementation) and “rpus”ġ. It is used throughout all the developing stages except the model building stage and the GUI development stage. There are 12 classes used in the code: nltk, json, pickle, numpy, keras, and tkinter, Wikipedia, Stanford Corenlp, Sentimental Analyser, GUI, Home, and Recent.Ĭlass “nltk” contains a group of libraries which provide statistical processing for English Language and is commonly used for Natural Language Processing. There are five stages of the development for the code: data importing and loading, data preprocessing, data training and testing, model building, and GUI developing. Further instructions are in the README file in the CODE folder. The first code is to train the model so that the GUI might function properly. To compile the code, we run in terminal these 2 lines of codes - “python train.py” and “python chatbot.py”. The second type of topic of the conversation is about the general information of Japan such as people, religion, food, samurai and so on. The first type of topic of the conversation is about the general information and personal preference of anime. The second type of target users includes anyone who are interested in Japanese culture. The first type of target users includes anime and manga lovers who would love to talk about them and know more about it. In response to the user, the agent generates sentences as output. In this project, we developed an interactive conversational agent that responds to user input. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |