A web service designed to help language learners expand their Mandarin vocabulary through Taiwanese songs. LyricLab's goal is to make learning more convenient and enjoyable.
LyricLab involves the design and implementation of a database for managing songs, lyrics, vocabulary, and recommendations with related attributes. The database is created and managed using Sequel, a Ruby toolkit for interacting with SQL databases. LyricLab pulls song information (title, artist, popularity, etc.) as well as lyrics from the Spotify and LrcLib APIs. Users can select one of the language levels and search for a song, generating a vocabulary list based on the selected level and the lyrics of the specified song. Users can then select specific words to see more learning information such as translations, pinyin, and example sentences.
The primary domain entities for this project are:
lyrics
and vocabulary
entries.vocabularies
and words
entities.lyrics
Entity:songs
Entity:id
in the lyrics
table.id
in the vocabularies
table.false
).vocabularies
Entity:words
Entity:recommendations
Entity:vocabularies_filtered_words
Join Table:vocabularies
.words
.Below is a conceptual representation of the database structure:
+-------------+ +---------------+ +---------------+
| lyrics | | songs | | vocabularies |
+-------------+ +---------------+ +---------------+
| id |------>| lyrics_id |<----| id |
| text | | vocabulary_id | | |
| is_mandarin | | title |+--->| language_level|
| is_instr. | | spotify_id || | created_at |
| created_at | | ... || | updated_at |
| updated_at | +---------------+| +---------------+
+-------------+ | ^
| |
+-------------+ +----------------------------+ |
| words |<------| vocabularies_filtered_words| |
+-------------+ +----------------------------+ |
| id | | vocabulary_id |-+
| characters | | filtered_word_id |
| translation | +----------------------------+
| pinyin |
| ... |
| created_at |
| updated_at |
+-------------+
+--------------------+
| recommendations |
+--------------------+
| id |
| title |
| artist_name_string |
| search_cnt |
| spotify_id |
| created_at |
| updated_at |
+--------------------+
songs
.lyrics
and vocabularies
.songs
and words
.vocabularies
and words
.config/secrets_example.yml
to config/secrets.yml
and update the information..ruby-version
for rbenv).bundle install
to install the required gems.