Rules the program follows
Example slide from powerpoint
Work in progress GUI
An output file from testing the Java class. Names would normally display, not <name redacted>.
Working on the GUI in MATLAB
Video: https://vimeo.com/152185264 Password: HackHW
At the start of HackHW, half of our team was away at a another competition. That left the two remaining members to brainstorm our idea. Our initial idea was to make a large program with many different features, but many of them required more knowledge of connectivity between languages than we knew. After throwing around a few school-related ideas, we settled on our current idea that assists with notes based classes.
What it does
Our program takes facts in a plain text document and turns them into questions to study. Many keywords in the sentence are replaced with the appropriate question words to create as many questions from the fact as there are keywords. These questions can be retrieved from the output file or can be studied using a simple GUI.
How we built it
The GUI is written in MATLAB, and calls API from Mathematica and our Java classes in order to run. The personalNotes class reads in a .txt file with a list of facts, each on a new line, and generates an ArrayList for each fact. These questions are, when not using the GUI, written to an output file in the format of the question text immediately followed by the answer on a new line.
To generate the list of questions, the static method toQuestion is called with a fact as a parameter. This fact is parsed into an ArrayList of individual words in the fact. The method then goes through each word and, if it is a question word as per the rules (see gallery), will create a Question object with the question and answer and add it to the ArrayList that will be returned. This repeats until the entire fact has been parsed.
Finally, MATLAB calls the personalNotes main method after setting an input and output file. The Java code runs as described above while Mathematica processes answers typed into the GUI and evaluates their natural-language interpretation (so that, for example, NYC can be interpreted as New York City). Then MATLAB takes the output file from the Java code and uses it to display questions in a short-answer quiz format.
Challenges we ran into
There were a number of challenges we encountered along the way. When initially working on this project, we had very large ambitions. For example, we wanted to be able to store and organize facts as well as classify the facts and questions into themes. Upon suggestion that the scope was too large, we narrowed it down to its current state.
We also encountered unsolved issues with turning facts into questions. Initially, the grammar in the outputted questions would be bad enough to render the question incomprehensible. Even after we fixed the problem, often, a question will be understandable, but not quite proper (for example, "in when the Civil War started?", is a possible question). Other times it will not be possible for us to know whether a question requires either a who/what or a when/how many. In this case, we have to provide both, leading to more strange phrasings.
Another problem was that during the majority of the time, we were only working on one Java class. This made it difficult for all four members to work on different sections. We were able to solve this using Saros, which allowed multiple people to alter the code at once. However, this was only a partial solution for Saros was unreliable when connecting more than 2 laptops.
Accomplishments that we're proud of
We are proud that we were able to work together and have the code work well within 2 days. Our teamwork contributed to our success and it allowed us to have better communication. This lead to a decrease in stress and increase in work productivity.
We also managed to create a fairly consistent set of rules which are able to output useful and understandable study questions. These rules, while not complete and sometimes with exceptions, effectively allow us to find simple facts in statements without teaching our program english grammar.
In addition, we learned how to make a GUI in MATLAB that was effective enough to fluently display many questions. Before this weekend, we had almost no knowledge of GUIs (besides very basic Java GUI understanding). Our proficiency of GUIs will be helpful in the future as well.
What's next for Class
In the future, we would like to both improve on current features and implement additional ones. First, we would like to improve on our rules for finding key words in the question so we would not need to use terms such as "who/what". In addition, we could improve the rules so that the questions are grammatically correct.
In terms of extra features, our highest priority goals are to implement a multiple choice mode with additional choices taken from other proper nouns in the notes and an ability to star questions to study again later. Another goal is to increase the usability of the GUI as well as making one through Java and MATLAB.
The Name "Class"
We choose the name Class because it sits in the intersection between school (class rooms) and computer science (classes in programs).