Skip to content
/ mitzlol Public

A search app for finding similar-sounded words in Hebrew.

License

Notifications You must be signed in to change notification settings

OfirD1/mitzlol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mitzlol

Mitzlol is a search app for finding similar-sounded words in Hebrew.

Usage

Imagine you're Nathan Alterman.
You're struggling to find similar-sounding words to go with "עוֹד חוֹזֵר הַנִּגּוּן".
Using Mitzlol, you'd find a nice match for "חז" (two of the consonances in חוֹזֵר): "זָנַח"!
Satisfied, you complete your first virtuosic line: "עוֹד חוֹזֵר הַנִּגּוּן שֶׁזָּנַחְתָּ לַשָּׁוְא".

demo

🔧 Installation

1. Prerequisitis

Mitzlol uses Node.js with Express.js on server side, and Vue.js on client side.

  1. Install Node.js.
  2. Install Express.js: npm install -g express.
  3. Optional: If you'd like to use Vue.js as the client, install Vue CLI: npm install -g @vue/cli

2. mitzlol folder

Download or clone mitzlol repository.

3. Hebrew Dictionary

You're going to need a Hebrew dictionary represented as a .sql script.
To achieve that, choose one of the following options:

Note that these options assumes you're using MySql, but you can use other RDBMSes.

👉 Use MILA Hebrew Lexicon

The following assumes mitzlol is the current working directory.

  1. Download MILA Hebrew Lexicon (go through its license terms) into mitzlolLexicon.

  2. Build the source code in mitzlolLexicon\ProcessLexicon (it's a .Net Core app).

  3. Run (replace path\to\ProcessLexicon.dll with your path):

    .\mitzlolLexicon\ProcessLexicon.bat path\to\ProcessLexicon.dll
    

    This would create a file named mitzlolLexicon.sql inside mitzlolLexicon folder.

  4. Load mitzlolLexicon.sql into MySQL (use Data Import in MySQL Workbench).

👉 Use your own .sql Hebrew lexicon

  1. Load your .sql file into MySql (use Data Import in MySQL Workbench).

  2. Change the arguments values inside mitzlolServer\mitzlolDbTarget.config:

    • table – The table to query (default value: item).
    • whereColumn - The column to filter (default value: undotted, see below).
    • selectColumn - The column to select (default value: dotted, see below).

    Note: The default values above comes from MILA Hebrew Lexicon, which separates its entries into 2 columns: dotted and undotted (i.e., with and without Nikkud, respectively).
    It is suggested to separate your lexicon table into two such columns, see below on how to do that.

👉 Create your own .sql Hebrew lexicon:

  1. Move your lexicon file into MySql's Uploads folder.

  2. Optional, but suggested:
    If you're lexicon file contains dotted words (i.e., with Nikkud), you can create an undotted version of it (i.e., without Nikkud):

    • Build the source code in mitzlolLexicon\ProcessLexicon (it's a .Net Core app).

    • Run (replace path\to with your paths):

      .\mitzlolLexicon\ProcessLexicon.bat path\to\ProcessLexicon.dll path\to\input\file.txt path\to\output\file.txt
      
    • Move the output file into MySql Uploads folder as well.

  3. Execute mitzlolLexicon\mitzlolLexiconCreator.sql in MySql.

    • Note: The mitzlolLexicon\mitzlolLexiconCreator.sql script assumes you have two .txt files, dotted.txt and undotted.txt, with each containing words separated by new lines.
      If any of these assumptions don't apply for your case, you'd need to tweak it for your needs.

🔨 If you want to use other RDBMS instead of MySql:

mitzlol was built and tested using knex, and is targeting MySql. However, knex supports other RDBMSes, and it shouldn't be too hard to target your favorite one. What you'd need is:

  1. npm install the appropriate database library to be targeted by knex.
  2. Tweak the queries inside wordRepository.js.

🚀 Run

The following assumes mitzlol is the current working directory.

Run mitzlolRun.bat as administrator using the following command:

mitzlolRun.bat --hostname=<mysql_host> --username=<mysql_username> --password=<mysql_password> --database=<database_name> <vue|react>

Such that:

  • <mysql_host> – Replace with your MySql hostname (if you're running locally, it's 127.0.0.1).
  • <mysql_username> - Replace with your MySql username (if you're running locally, it's probably root).
  • <mysql_password> - Replace with your MySql password.
  • <database_name> - Replace with your MySql's lexicon database name.
  • <vue|react> - Choose either vue or react to use as the client.

🔗 Similar apps

Hebrew:

English:

About

A search app for finding similar-sounded words in Hebrew.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published