Mitzlol is a search app for finding similar-sounded words in Hebrew.
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: "עוֹד חוֹזֵר הַנִּגּוּן שֶׁזָּנַחְתָּ לַשָּׁוְא".
Mitzlol uses Node.js with Express.js on server side, and Vue.js on client side.
- Install Node.js.
- Install Express.js:
npm install -g express
. - Optional: If you'd like to use Vue.js as the client, install Vue CLI:
npm install -g @vue/cli
Download or clone mitzlol
repository.
You're going to need a Hebrew dictionary represented as a .sql
script.
To achieve that, choose one of the following options:
- Use MILA Hebrew Lexicon (most suitable for the common user)
- Use your own
.sql
Hebrew Lexicon (suitable if you already have such a.sql
script) - Create your own
.sql
Hebrew Lexicon (suitable if you already have a Hebrew dictionary, but not as a.sql
script)
Note that these options assumes you're using MySql, but you can use other RDBMSes.
The following assumes mitzlol
is the current working directory.
-
Download MILA Hebrew Lexicon (go through its license terms) into
mitzlolLexicon
. -
Build the source code in
mitzlolLexicon\ProcessLexicon
(it's a .Net Core app). -
Run (replace
path\to\ProcessLexicon.dll
with your path):.\mitzlolLexicon\ProcessLexicon.bat path\to\ProcessLexicon.dll
This would create a file named
mitzlolLexicon.sql
insidemitzlolLexicon
folder. -
Load
mitzlolLexicon.sql
into MySQL (use Data Import in MySQL Workbench).
-
Load your
.sql
file into MySql (use Data Import in MySQL Workbench). -
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
andundotted
(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.
-
Move your lexicon file into MySql's
Uploads
folder. -
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.
-
-
Execute
mitzlolLexicon\mitzlolLexiconCreator.sql
in MySql.- Note: The
mitzlolLexicon\mitzlolLexiconCreator.sql
script assumes you have two.txt
files,dotted.txt
andundotted.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.
- Note: The
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:
npm install
the appropriate database library to be targeted byknex
.- Tweak the queries inside
wordRepository.js
.
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's127.0.0.1
).<mysql_username>
- Replace with your MySql username (if you're running locally, it's probablyroot
).<mysql_password>
- Replace with your MySql password.<database_name>
- Replace with your MySql's lexicon database name.<vue|react>
- Choose eithervue
orreact
to use as the client.
Hebrew:
English: