Similarity search mod
|Similarity search Mod|
|Summary||Adds similarity search on person/place names|
|Mod Updated||28 Sep 2016|
|Download link||similarity-search-v126.96.36.199.zip for
|Author(s)||Rovian Veronez and Carlos A Heuser|
|Homepage||Similarity_search_Mod (This page)|
|Mod Support||Carlos Heuser|
|Contact Developer||Carlos Heuser|
|Latest Mod||188.8.131.52 for TNG V9.2.2|
10.0.0.2 for TNG v10.0.0
10.1.2.1 for TNG v10.1.2
184.108.40.206 for TNG v11.0.0
220.127.116.11 for TNG v11.0.2
18.104.22.168 for TNG v12.0
22.214.171.124 for TNG v12.2
|Min TNG V||9.2.2|
|Max TNG V||12.2|
Warning - TNG database is modified
This mod changes the TNG database.
Triggers are added to existing tables and new tables are created. Read the installation and removal instructions carefully before installing the Mod. As usual in cases like this, making a backup copy of your database previously to the Mod installation is highly recommended. If you don't feel comfortable with this, please don't use this Mod.
Read the update instructions if you are using a previous version of the mod.
Purpose of this mod
Names may change spelling over time. In my tree you will find the same name spelled as Heuser, Heiser, Heusser and Heusers. The same may happen to place names. For example, a place that was spelled Villa Izabella in the past, may be spelled Vila Isabela today.
Additionally, one can not expect that each TNG user searching for somebody in a tree knows the exact name spelling that was used by the author of that tree.
When the exact spelling of a name is unknown, similarity search may help.
TNG offers two alternatives of similarity search: Soundex and Metaphone. However, they are not always useful. Both are language dependent. Soundex reduces a word to just four characters and tends to output a large number of results. Metaphone tends to be very restrictive.
This Mod introduces a novel way of searching for persons or places. The user simply provides one or two words of the name of the person/place being searched and TNG will display a list of names that contain words similar to the query.
Using the Mod
The Mod creates a new menu entry at Find >> Word Search. By selecting this entry the user is taken to the search form that is depicted below.
To perform a search enter one or two words of the name you are searching for in the field. Results are displayed on-the-fly as the user enters some letters. The result is presented in decreasing order of similarity.
There are several options to control the search:
- There is a radio button to select between a person search and a place search.
- The Gedcom to be searched may be selected.
- There is a radio button that allows to specify the similarity precision (Exact, Very precise, Precise or Inaccurate).
By clicking on a person/place name the user is taken to the corresponding page.
How it works
Each word in a person/place name is divided in a set of "grams" of size three. For example, "Smith" results in "Smi", "mit", "ith". All this strings are stored in a database table, together with a pointer to the person/place it belongs to, as well as with the position of the gram in the name.
When a query is submitted to the Mod, each word in the query is divided in grams in the same way. The grams in the query are compared to those in the database. The mod will search for words that contain a similar set of grams at similar positions. Everything happens in SQL meaning that response time is very short. This approach has been tested in other applications (not TNG) and gives good results even with very large databases (tens of millions of words).
Mod installation and database setup
The mod is installed as usual with the Mod Manager:
- If you are using an older version of the mod, read the update instructions below.
- Download the zip file containing the mod files and unzip it in the TNG mods folder.
- Install the mod with the Manager.
- Clear the browser cache (required, do not forget!)
Note: After the mod is installed the database must be prepared for use with the mod. If you are reinstalling the mod, you do not need to prepare the database again.
Go to Setup in the TNG Administration page (Info >> Administration >> Setup).
At the Setup page, you will find a new tab called Similarity Mod.
Click on this Tab. A page like the one displayed below will be shown.
This page contains sentences like "Table prepared for people: None". This means that the database has not been prepared for the Mod.
In this page you may select up to three events that will be handled by the mod. These should be events that contain person names in the Detail field of the event. For example, I use the Alias event to store alternative names for a person and the Married name custom event to store a woman's married name.
Hit the Prepare button and the database will be modified for use by the mod.
After some time the page below will be displayed. Notice that if the database is large this process make take several minutes. I have a database with about 12,000 individuals and 1,500 places. For this database the current version of the mod takes about 30 seconds to prepare the database. (previous versions required between one and five minutes for the preparation depending on the server being used).
If you go back to the setup, the page below will be displayed. Sentences like "Table prepared for people: tng_people" will be displayed, informing the the database is prepared for use by the mod.
Upgrade from previous versions
If you are upgrading from a previous version you must prepare your database again, as in some versions the database structure has changed.
Follow this procedure:
- Using the mod version you have installed, go to Setup in the TNG Administration page (Info >> Administration >> Setup).
- At the Setup page, you will find the tab called Similarity Mod.
- Click on this tab. Click on the "Delete" button and confirm that you want to delete all tables.
- After some time, a page will be displayed confirming that the tables have been deleted.
- Uninstall the old version of the mod and remove it from the mods folder.
- Install the new version as described in the installation instructions, including the database preparation described in the previous section.
In order to remove the mod, you must first delete the information stored by the mod in the database.
Go to the Septup page of the mod in the TNG Administration page (Info >> Administration >> Setup). A page like the one above will be displayed. Hit the "Delete" button.
After that you may uninstall the mod as usual by using the Mod Manager.
'Be aware that if you don't follow the above steps, triggers will be left in your database. Should you subsequently delete the tables by other means, errors such as "Table 'tng.qgrams_grams' doesn't exist" will be displayed.
The mod already contains translations to Dutch, French, German and Brazilian Portuguese.
Mod developer is Rovian Veronez with changes by Carlos Heuser. French translation provided by André Morel. Dutch translation by Roel Jongman.
|v126.96.36.199||04 Mar 2020||
|v188.8.131.52||24 Feb 2020||
|v184.108.40.206||14 Jan 2020||
|v220.127.116.11||28 Sep 2016||
|v18.104.22.168||17 Mar 2016||
|v10.1.2.1||13 Mar 2016||
|v10.1.2.0||22 Jul 2015||
|v10.1.0.0||26 Jan 2015||
|v10.0.0.2||18 May 2014||
|v10.0.0.1||11 Mar 2014||
|v10.0.0.0||13 Jan 2014||Changed for compatibility with TNGv10|
|v22.214.171.124||15 Nov 2013||Fixed the way event type names are displayed in the setup page. Changed the Search link to point to the Mod search form. Inserted a link in the Mod search form pointing to the regular TNG search form.|
|v126.96.36.199||29 Oct 2013||Mod realease|