I'm a language learner myself, and when I was at the beginner and intermediate stages, I always found it difficult to find comprehensible, accessible content. Most foreign resources were either too long, difficult, or hard to get.

I created SurgeLingo to solve this. It uses an open-source sentence database with millions of sentences to provide a personalized feed of sentences based on user-chosen settings, such as language, difficulty, and tags. These sentences gradually get more difficult, and can be learned and stored with just a click.

The online aspect solves the accessibility issue, the individualized response solves the difficulty issue, and the 200-character limit makes it a breeze to learn with SurgeLingo, whether sitting at a bus stop for a minute or intensively studying at home for an hour.

What it does

Drawing on sentences from Tatoeba, SurgeLingo creates a massive database of tagged sentences, or 'surges' - since by using the platform, users 'surge' ahead in their learning. These sentences are reduced to their unconjugated form through natural language processing, and can be compared against a user's known words to show personalized results.

A user can upload their own wordlist, for example from a frequency list, to generate these known words. Whenever they view a sentence, they can click on a red, unknown word that they now have learnt to add it to their database as well - or simply mark the whole sentence as known after having studied it.

For a more focused session, users can change the difficulty of returned sentences (for example, from Easy, where 90% of a sentence's content is known, to Difficult, where that is 70%). They can also search for a specific type of surge by specifying words found inside the sentence, a tag, an author, etc - perfect for learning vocabulary in context. Just learning from flashcards won't really help you grow unless you see the new words in context (as SurgeLingo provides), as that will solidify its meaning and demonstrate its usage.

Below you can see an example of a surge. Example sentence surge

Additionally, users contribute to the community by writing and submitting their own surges.

How I built it

The frontend was built with Nuxt and Vue 2. TailwindCSS was used for styling, and the modules nuxt-auth and nuxt-axios were used for smooth user authentication and requests to the backend.

The backend was built with the Flask Python microframework, and used a PostgreSQL database to store user info, sentences ('surges'), and so on.

The nltk Python package, a natural language processing library, was leveraged so that surge sentences and user wordbanks would be stemmed, a process that reduces the words inside to their root form. This allowed for support of languages that have conjugation. A number of other packages that extend Flask or allow for content generation were also used.

Challenges we ran into

Nuxt and Flask is a rare combination, and so I had to dig deep for a number of problems to coordinate the backend API and the frontend.

The most obvious of these was user authentication - I had to set up a cookie-based implicit refresh system, and the library that I was using for auth on the frontend, nuxt-auth wasn't built with Flask in mind. So, I had to customize the module configuration and take a lesser-known approach to JWT token passing.

Another challenge, of course, was that of time. Working solo and having a few activities on the weekend, juggling developing the project was a challenge. I had to leave 'coming soon' content for a few pages that weren't a priority, such as the About Us or user profiles.

Accomplishments I'm proud of

I'm proud that I managed to create a near fully-featured product in the 48 hour timeframe, as this being my first hackathon I was worried I'd run out of time. The core features are all present.

I'm also happy that I was able to create the highlights for sentences based off whether the words inside were known by the user. It was much more difficult than I thought; I had to do some natural language processing and stemming - which I'd never done before. But I was successful, and I'm proud of that and my perseverance, spending quite a while building this.

What I learned

I learned a lot about word processing, since I had to stem all words in multiple languages so that sentence analysis would work well.

Equally, I explored some aspects of PostgreSQL management through Flask that I wasn't aware of before, such as BaseQuerys, advanced filtering, and more. This newfound knowledge will definitely come in handy in the future.

What's next for SurgeLingo

I'm very pleased with the result, and I think SurgeLingo has a lot of potential. Existing technology is capable of building a platform like this, and combined with monetization methods mentioned in the video introduction, I'm deeply considering continuing to build this and shipping it as a final product.

The core functionality is more or less finished, but there are still a few things to wrap up such as user profiles, file uploads, limited upvoting/downvoting, and so on. I also need to host it remotely.

Of course, this is something I'll definitely be doing if I'm able to pitch it at Canada's Innovation Corridor Summit.

Share this project: