VIETNAM NATIONAL UNIVERSITY - HO CHI MINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY FACULTY OF INFORMATION SYSTEMS HO HOANG TUC AN HOANG MINH KHIEM GRADUATE THESIS BACHELOR OF ENGINEERING IN INFORMATION SYSTEMS HO CHI MINH CITY, 2020 VIETNAM NATIONAL UNIVERSITY - HO CHI MINH CITY UNIVERSITY OF INFORMATION TECHNOLOGY FACULTY OF INFORMATION SYSTEMS HO HOANG TUC AN - 16520003 HOANG MINH KHIEM - 16520588 GRADUATE THESIS BACHELOR OF ENGINEERING IN INFORMATION SYSTEMS THESIS ADVISOR Associate Professor - Doctor DO PHUC HO CHI MINH CITY, 2020 UNIVERSITY OF INFORMATION TECHNOLOGY ADVANCED PROGRAM AEF Advanced Education Program IN INFORMATION SYSTEMS COMMENTS OF THESI SS REVI EWER/ ADVI SOR Thesis title: APPLYING DEEP LEARNING IN SOLVING ARITHMETIC WORD PROBLEM IN VIETNAMESE Student 1: Advisor: HO HOÀNG TÚC AN_ - 16520003 Associate Professor Do Phuc Student 2: HOANG MINH KHIEM — 16520588 Comments 1. Report format: Students have complied with graduation thesis format requirements. Students write reports in accordance with scientific format. Research content is appropriately distributed in 5 chapters, fully covers the work that students have done.
Research content: Students can explore, research and present content related to the thesis topic which is applying deep learning to process natural language of arithmetic word problems in Vietnamese. In addition, students have also applied deep learning models into the classification system of different problems. Application Students can deploy applications on the web. Students have built a complete application related to the graduated thesis on basic text classification, arithmetic word problem solving and Chatbot questioning, which is highly practical and aesthetic.
Attitude Students work seriously, carefully, thoughtfully and have a high sense of responsibility to complete their dissertation on time. Overall assessment: Excellent Mark: Student 1: 9.5/10 Ho Chi Minh city,. Reviewer Assoc Prof. DO PHÚC ASSESSMENT COMMITTEE The Assessment Committee is established under the Decision.
by Rector of the University of Information Technology. II eccccceeseseeesssseessseeeeenes - Chairman. - Secretary — - Member ACKNOWLEDGMENTS We would like to express our special appreciation and thanks to Associate Professor Do Phuc for being a great advisor to all of us. With his patience, motivation, enthusiasm, and rich knowledge, Mr.
Phuc has helped us a lot in the process of researching and writing this thesis. Without his valuable guidances, we would not be able to complete this project successfully, fully, and on time. Next, I would like to thank all the teachers in the faculty and the school for their enthusiastic guidance so that I have the opportunity to do this graduation thesis. Besides, we would like to thank Mr.
Hung Le and the rest of our classmates for their supports, encouragement, and insightful comments during the process of making this thesis. And finally, we would like to extend our deepest gratitude to our parents, brothers, and sisters for their love, caring, and sacrificing for educating and preparing us for this day. Sincerely, Ho Chi Minh City,. Student 1 Student 2 TABLE OF CONTENTS caso ACKNOWLEDGMENT .ccssssssssssssscscssssessessccssssssscsessesessasscssesessecsessssersassessesessesses i TABLE OF CONTENTS .scscssssssssssssccssssssesscssrsessscsessssessesssssssessccsessesessassssessesscsses ii LIST OF EFIGUREES.
HH 0006008090 Y LIST OF TAB.-c << G0 00600800004000410008040060000 vii LIST OF ABBREYVTA TIONS. (TH HH 100 000048068080060406880 056 viii ABSTTRACCTT. 00008 008040489008060081000004000800000048059004001880 ix Chapter 1 Infr0UCfÏOIT.1 Context of arithmetic word probl€rm.2 _ The problem and its significance in real lIÍe. ieee ee ceeceesecseseeecseseesesceesscseesesseessesesscsssessenesaseesaseeeenaeees 2 3 he.2 BH TONSSS sọ ĐÔ ——Í ĐỀ Tà TH Tà Hà Tà ki HU2 I0 cm .-- «<1 thà HT TH TH HH HH3 1.
Ăn HH HH HH HH4 1.4 OUP mOtIVA(IOH.-- ST TH TH HH HH4 IS) ) ái nh cố. -ó- + 1h91 HT nh HH nh nh ngàn6 Chapter 2 Background and theory .2 Natural Language PTOC€SSITE.- - -- + 1v vn 1g ghe 8 ii 2. 9 24 Part-of-speech fagø1ng.---- 5 tk HH ng TH HH nh ghghnưh 11 2.-- -- - - - + 5 k9 21 v1 11v ng ng ngư 14 2.1 Frequency-based embeddIng.2 Prediction Based Embedding.6 Deep Learning model. --- 6+ x19 12v 2 ng gu ng re 23 2.
Ăn HH HH TH ngư 23 2.2 Recurrent Neural NefWOTK.- Sàn HH HH gi, 27 2. SN cố hh.- ---¿- +5 *S* SE kh HT HH HH rệt 34 Chapter 3 System design and implemennfafÏOTA. s- << <5 5< s5< s=< se sssssese 35 E9 cà 9ê.2 Constructing and pre-processing (Ìafa.1 Identifying domain and generating related data.3 Vietnamese tOk€n1ZafIOI.--- 6 + tt HH ng gi 42 3.4 Solving problems with built-in fUNCtiONS.5 Deploy the model using the Flask framewWOTK.----- ++s se £sx+exsesese 55 3. 56 Chapter 4 System evaluation and insfaÌÏafÏOI.1 Overview of the system €VaÏUafÏOTI.1 Component of system evaluation.
«hà TH TH HT HH nghiệt 58 co nh.-- S55 Sàn HH HH ri 58 CV AM ác.-- s5 xxx ngư 64 ` su ri on. 71 Chapter 5 Conclusion and recommenafÏOTA.1 The achieved r€SuÏ(S.2 Limitations and future WOTKS. ¿+ 5c SE St SE +EEEEE+EskekErkrkrerrkekrrrrerxre 75 REFERENCES GP, on TEI .cc cÍso<e << na n2 Á4880801004664088480868408400846086 6866 77 APPENDIX A: Additional image of ChaafOÉ.o 05555 55s S59 55 89558955896 79 APPENDIX B: Some problems in experimental dataset .-- <5 5 «55s «sess 81 APPENDIX C: Some examples types of question to teSt .s--<s=es sesssesss 82 iv LIST OF FIGURES caso Figure 2.1: Visualize the count of the first iteration in D3 and D4.2 The Skip-gram model architeCfure.3: The Continuous Bag of Words model architecture .4 The word “gastroenteritis” slide into many n-grams in fastText.5 FastText’s result of finding words similar to “øastroenferIfIs”.6: An Artificial Neural Network archIt€CfUT€-.- 555cc s+xssssxsex 24 Figure 2.7: A basic unfolded RNN .----- nàn HH HH ngư 25 Figure 2.8: Types of RNN models .9: The repeating module of LSTM .10: The cell state of a memory CeÌÌ_.-- ¿+ ++s£+x+k£sxex+ersxeerseeeree 29 Figure 2.11: The gate of the memory Cell .- -¿- 6+ 5+ +++£+*£+*£+E£eE+eE+eEeeEeereereesseeee 29 Figure 2.12: The processes the forget ØAf€.13: The processes in the input Øaf©.-- ¿5< + 5+ + £sx++eEseerseeeree 31 Figure 2.14: The processes in the cell Staf€.15: The processes in the output gate oo. cece eeeseeeeseeeeeseeeeseseeseseeeenees 32 Figure 2.16: Basic architecture of GRU's celÏ.1: The pipeline of the SÿSf€TT.2: Data construction DID€Ï1T€.3: The comparison of combinational Unicode and built-in Unicode.4: The pipeline architecture of VnCoreNLP .5: Result of the Vietnamese word token1ZafIOI.6: Results of LabelEncoder() fUNCtion .7: Result Of TF-IDF ã21.8: Top Python Libraries for Deep Learning, Natural Language Processing & Computer ViSIOT.
G5 1x9 ng nh HH ng ng gu rà 47 Figure 3.9: Structure of LS TM model .- - ó5 11x 91 11 9 1 111111 1 vn ng ri 48 Figure 3.10: Graph of the ReLU ÍunCfION. - - 6-6 +S+S+ SE *k*#ersrsrerrkrkrkrere 49 Figure 3.11: Example softmax activation funCfIOH.---- +5 + + ssx+tsexseserseeerseeeeee 50 Figure 3.12: Structure of GRU model .13: Result of POSÏT,. - -- «5 s11 1919311111 11121 HH TH HH TT ghi 53 Figure 3.14: Results of locating words in Sentences .15: Problem-solving with built-in functions pipeline.17: Web application 1TI{TÍiAC€.1: System evaluation pID€Ï1TI€.- -- c5 2S 2xx 9 9k2 kg vn ren 58 Figure 4.2: Training accuracy of LSTM model.- - - - «+ 5+ + ‡xesk+rersrerereeeees 59 Figure 4.3: Training loss of LSTM mOeÌL.4: Training accuracy of GRU mmoel.5: Training loss of GRU model .- 6 6< 5+ + £**E*EeE+eEseeeeeereereseserse 62 Figure 4.6: Comparison of LSTM and GRRỦ.7: Insight of experimental DFOC€SS.-- ¿5-56 + St Sssrerseerseevree 65 Figure 4.8: Limitation of system - A.- 5s th HH ng HH ng hp 66 Figure 4.9: Limitation of system —. --- ¿64 kh HT TH HH HH TH HH rêp 67 Figure 4.10: Distribute the number of answers to complex quesfIon.11: Interface of Chatbot - A.
s65 1211121 1911 19121 101g ng ren 70 Figure 4.12: Interface of Chatbot — B,. -- St 3 121 1911119121 101g ngư 71 vi LIST OF TABLES caso Table 2.1: Texts representation in Vietnamese and English. HH HH HH ng HH HT TT HH TH TT HH ghi 12 Table 2.3: Count vector Of D1 and ]D22. - 5 5 tk 2%1 1 E1 91132311 9v vu ren 15 Table 2.4: Co-occurrence matrix of D3 and ID4.1: Old and new way for accent marks the DOSIfIOTI.1: Training accuracy Of LS TM model .2: Training loss bo08 0/0001.3: Training accuracy of GRU model .4: Training loss of GRU model .5: Comparison between human and LSTM model .-- 5 + «5s ++s<++ 65 Vii LIST OF ABBREVIATIONS caso Al Artificial Intelligence ML Machine Learning DL Deep Learning RNN Recurrent Neural Network CS Computer Science NLP Natural Language Processing POS Part of speech LSTM Long Short-term Memory GRU Gated Recurrent Unit NLU Natural Language Understanding NLG Natural Language Generation POST Part of speech tagging CREs Conditional Random Fields HMMs Hidden Markov Models TF - IDF Term Frequency — Inverse document Frequency SVD Singular Value Decomposition PCA Principal Component Analysis ANN Artificial Neural Network Vili ABSTRACT Today, more and more applications are using Deep Learning’s abilities to support teaching and learning for students, especially in the field of mathematics.
Among them, arithmetic word problems are always a big challenge when computers are very difficult to understand and solve a problem entirely in natural language. In this graduate thesis, we present a complete pipeline to help a computer automatically understand and solve a whole arithmetic word problem. This system will allow the computer to analyze and extract information from arithmetic word problems in natural language, classify them and return the most accurate results for the user. Our knowledge topics focus on simple elementary school level arithmetic word problems.
A Vietnamese Chatbot is built on our system to increase user engagement. ix Chapter | Introduction 1.1 Context of arithmetic word problem The advent and development of Industry 4.0 have led to the development of all aspects of information technology. Artificial Intelligence (AJ) technology and related fields of study like Machine Learning (ML) or Deep Learning (DL) have grown rapidly and strongly, changing in many aspects of life such as health, culture, finance, and education. In recent years, there have been many positive changes in education to improve the quality of teaching and learning for both teachers and students.
Such changes include increased outdoor activities, increased interaction between individuals and groups, etc. Also, applying information technology to teaching has helped students have more new perspectives, increase their ability to access larger and more diverse knowledge sources. However, the effectiveness of applying information technology is not thorough, especially with some logical subjects such as Mathematics, Physics. With inference subjects like Math, students always need interaction and support from teachers and instructors, this leads to a lot of shortcomings.
Therefore, in this project, we want to build software applying DL to be able to solve basic arithmetic word problems. From here, students can use this application to increase their ability to understand the problem and improve the quality of learning.2 The problem and its significance in real life Arithmetic word problems are written in natural language. Natural language may be easy for human, but it is difficult for a computer. Computers not just need to “understand” word problems, they also need to solve them.
Therefore, there are two difficulties we are facing. The first problem is helping the computers to understand and analyze the natural language; it is hard because natural language is ambiguous. In this case, we do not need the computer to “understand” each word in the problems, instead, we will use some algorithms to help the computer recognize the template of those arithmetic word problems. The second problem is to identify the type of problem.
With arithmetic word problems, there are many different types that students need to solve, and each of these types will have several structures. Our task is to find out the keywords and facts contained in the problem to identify the math format. To do this, we will use DL abilities to automatically identify existing problems, as well as recognize new types of math. From there, the computer can know which formula to apply to get the most accurate results.