Logo

dev-resources.site

for different kinds of informations.

How I built a rhymes dictionary ?

Published at
6/9/2024
Categories
mobile
french
ionic
javascript
Author
camarm
Categories
4 categories in total
mobile
open
french
open
ionic
open
javascript
open
Author
6 person written this
camarm
open
How I built a rhymes dictionary ?

Hi and welcome to this new article !

I've been working hard on my mobile dictionary Remède this last month (I released the 1.2.0-beta version a week ago).

I've added many things but today I will focus on a special functionality.

I've added a rhymes dictionary which is completely running on your phone (or any browser) without an internet connection !

1. - Find data to build a rhymes database

I've searched for open source projects which had already built a rhymes database so I can re-use their database and adapt it for Remède.

After some searches, I discovered that Open Lexicon, a project which provides various open database about words, has enough data to build a rhymes dictionary.

I found the Drime project, which uses Open Lexicon database to generate its own rhymes database. With their documentation, I built my own base and added these rows in a new table of the Remède database.

2. - How it works ?

If you don't know Remède (you can check it out on Github and leave a star), it uses a Sqlite database which is downloaded locally.

Now that I have enough fields about words, how can I build an efficient dictionary ?

First, let's explain how this dictionary is working.

A table rime contains rows (one row is equal to one word) with the fields phon_end, word_end (and more fields like feminine or elide for particular rhymes...).

So for example, to get the rimes of the word bonjour, phoneme \b$ZuR\, we will filter all the words whose phoneme finishes with uR.

The requests will look like

SELECT word FROM rime WHERE phon_end LIKE '%uR'
Enter fullscreen mode Exit fullscreen mode

And you understood the main concept ! Now we can add fields to filter and get more specific results, like in the application.

3. Final look

Yes we have a dictionary but not anyone can use it ! You must know Sql to browse it...

I tried to have the simplest and most understandable interface. For the interface, I use Ionic 7 with Vue 3.

I integrate this functionality as following in Remède:

Description Screenshot
Searching a word in the rimes dictionary Rimes dictionary
Browsing rimes Browsing
Set syllabes filter Filter

What's next ?

For the moment, some functionalities are missing and the experience is not perfect... I want to add the possibility to choose the "nature" of the wanted rhymes (verb, noun...) and to enhance word finding experience.

Thank you for reading,
Don't hesitate to try Remède (https://remede.camarm.fr, and let me a message about your experience if you want !)
Have nice code !

ionic Article's
30 articles in total
Favicon
Parental Control Solutions: iOS VPNs for Family Safety
Favicon
Domina el arte de la personalización en Ionic: Crea paletas de colores únicas paso a paso
Favicon
Implementacion de videollamadas multiplataforma iOS - Android
Favicon
Ionic: Angular 18, CapacitorJS & SQLite
Favicon
Crafting the Face of the Web: 10 Quotes on Front-End Development
Favicon
Hello ionic
Favicon
How to Easily Notify Users About Task Progress in Angular
Favicon
Quick Guide to Installing Android SDK Platform Tools on macOS and Windows
Favicon
How to edit angular ionic app in locally? the project angular version 13 and ionic version 5?
Favicon
how to: open a component like a sheet modal using ionic 7
Favicon
Why Ionic Outperforms Flutter in 2024: 7 Data-Driven Reasons to Choose Ionic
Favicon
Besoin d'aide pour créer une application d'enquête générique
Favicon
Desktop Application Development: Why It Still Matters in a Digital World?
Favicon
Integrating Capacitor with Next.js: A Step-by-Step Guide
Favicon
Top Ionic Interview Questions and Answers
Favicon
How to Build a Vue App To Show Your GitHub Repositories
Favicon
How To Easily Expand or Collapse All Accordion Items in IonAccordionGroup at Once Without Adding Complexity
Favicon
Ionic loader, without clicking event (loading.dismiss())
Favicon
How I built a rhymes dictionary ?
Favicon
Building Native Applications with Capacitor and ReactJS
Favicon
Setting Up ESLint and Prettier in an Ionic Angular Project
Favicon
Remède V1.1.5
Favicon
Creating a Mobile App with Ionic and Vue.js 🚀📱
Favicon
Running a Phaser Game on Mobile Devices
Favicon
Working with Scenes and Data in Phaser
Favicon
Diving Into Capacitor 6: What’s New, What’s Improved, and How to Upgrade
Favicon
Announcing Ionstarter
Favicon
Ionic v8 - Create Even Better Hybrid Apps
Favicon
Ionic + Capacitor Security Tips
Favicon
Responsive Ionic app development services

Featured ones: