-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocumentation.txt
More file actions
50 lines (34 loc) · 2.96 KB
/
documentation.txt
File metadata and controls
50 lines (34 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
The application Hindi Arithmetic Word Problem Solver aims to use a rule-based and statistical approach
to solve arithmetic word problems in Hindi Language.
The code consists of 6 modules-
equation.py:
This module is the first part to get executed and is the part from where all the other modules are called,
and does the function of identifying and seprating the containers, objects, and their values/quantities from each sentence. After calling all the functinos, this module checks whether the answer
calculated was correct or not, and displays the accuracy achieved by the system.
kartakaram.py:
This module takes a sentence, and identifies the karta, karam and sampradan in the sentence with
the help of morphanalyzing and searching for vibhaktis as suffixes or seprate words.
calculate.py:
This module takes the karta, karma, sampradan, the container lists, and the verbtype and operates upon the karma of the karta and sampradan containers based upon the transfers occuring in the word problem and
changes the values of the containers accordingly.
finalsentence.py:
This module receives the final sentence, i.e. the question that needs to be answered by the word problem,
along with the list of containers involved in the problem.
Based on certain rules, and whether the final question requires any more operations, it finds the answer and returns it
to the calling function.
source.py:
This module contains list of all the word-problems that are taken as the test data,
along with their corresponding answers for checking the accuracy.
eng-hin_numbers.py:
This is a module being used to print the final answer of each question in hindi as well as in english numerals
for better readibility by a native Hindi speaker.
----INSTALL INSTRUCTIONS----
1. Download ISC Tokenizer from https://bitbucket.org/iscnlp/tokenizer/src/master/ and install it. Now, copy the isc_tokenizer folder into the same directory as the directory of the Word Problem Solver.
2. Download ISC POS Tagger from https://bitbucket.org/iscnlp/pos-tagger/src/master/ and install it by following instructions in README. Then copy the directory isc_tagger into the same directory as the directory of the Word Problem Solver.
3. Download Hindi Morphanalyzer from https://iiitaphyd-my.sharepoint.com/:u:/g/personal pruthwik_mishra_research_iiit_ac_in/EVdvOPI6vOxBn02Lnuh9Pz4B4dnZJwXNGhsTMAnJN0dXIw?e=IOPU3S and install it by following the instructions in the README. Copy the script run_morph_on_file_with_raw_text.py and the folder convertor-indic-1.5.2 and morph-hin-le-5.0.5 into the same directory as the directory of the Word Problem Solver.
The necessary tools are now installed, and the application can now be used.
----USAGE INSTRUCTIONS----
1. Put the sentences you want to run the Solver on in the list in the script source.py, along with the expected answer if you wish to measure the accuracy.
2. Run the command, while in the current directory
$ python3 equation.py
The Solver will run and display the output and answers accordingly.