We all know about reading - it is an essential part of the learning process, and an experience that almost everyone enjoys. However, from beginning learners to researchers, we have all met occasions where we got lost in texts. We might find it hard to understand the text and its main idea, or we simply want to increase your reading efficiency. As international students ourselves, we run into this situation all the time. For example, Vivian, one of our teammates, is really interested in the topic of her First Year Writing Seminar, which is feminism. However, the lack of background information and the language barrier she faced prevent her from learning more from the articles. We believe the summary tool we provide can help people to learn more from reading, especially less educated people, children, and non-native speakers.
What it does
Our app operates on a simple, user-friendly website. The user can submit the article or text that they want to analyze onto the website. Within a click, the user can get the output, which includes the main attitude of the author, keywords in the text, and the important sentences in the article. The output starts by displaying author’s main attitude toward the topic: it states whether the author strongly opposes, mostly agrees with, or simply has mixed feelings about the topic of the article. For the second part, we present the list of keywords, categorized into person, consumer good, organizations and more. Each keyword contains a link, which directs the user to the Wikipedia page for the keyword. In this way, a user can get some basic background information about the text and prepare themselves for the reading. The last part of output lists the important sentences in the text. The user can decide to show more or less text by clicking the buttons. Whether the sentence remains on the page depends on its salience or importance, which we determine through the TextRank algorithm. With those three parts of output working together, a user can have a basic understanding of the article in a progressive way, and know what part to pay attention to when reading through the whole text.
How we built it
We built the web app with open-sourced web UI framework and database framework. We used Google Language API to help analyze the text and implemented TextRank algorithm to further our machine’s understanding of the text. The result of the analysis is then stored into cloud database, ready to be fetched by users at any time.
Challenges we ran into
On the second day of hackathon, we got into a serious problem with Google Cloud API authentication, which essentially made the Google client library unusable. We searched help from Google’s engineers and made full efforts, but we still could not resolve the issue. Luckily, we had an alternative method in mind: we turned to REST API that relies on HTTP communication to workaround this issue. We also had a performance problem with our app. Due to necessary communication between servers to use Google API and complexity of our algorithm, the text analysis program is usually slow. We partially solved the problem through optimization, so that the final running time is less than 20 seconds.
Accomplishments that we're proud of
- We successfully completed a project in our first hackathon.
- Built a fully-functional website, from backend to frontend.
- Used google natural language API to increase the accuracy of our analysis
- Found a way to workaround the buggy Google client API library
- Implemented TextRank algorithm to rank sentences based on importance
- Great idea: the app is going to be helpful to a wide range of people
- Huge potential: help researchers to browse large amount of texts with high efficiency and adapt to the data-intensive - age
What we learned
- How to use GitHub for version control and team cooperation
- How to build interface hierarchy
- How to use existing framework to build a website
- How to read through other people’s code and help others understand our code
- How to find workarounds when the API we rely on breaks.
- How to creatively present our ideas and connect them to other people