TNG Integration Search1

From Genwiki

Revision as of 11:22, 22 July 2006 by Admin (Talk | contribs)

Jump to: navigation, search

Place String Search / Match Strategy 1

This version of the "link_wiki.php" file differs in it's approach to Location Strings and how it tries to match the GenWiki pages.

This approach is targetted at Location Strings that have been entered in a somewhat unrestricted manner. Programs such as PAF (Personal Ancestral File) do not require a specific form for location strings, and allow any user entered string. TNG is based upon the construct that locations are comma separated fields, and are formatted somewhat like typical postal addresses. This means the location becomes less specific as you read left to right.

A typical format might be: town, county, state/province, country

Another format might be: Lot, Road, Settlement, Parish/Township, County, State/Province, Country

There are many possible formats, and it is often the case that within a single TNG database there will be a mix of many different structures.

Search / Match Strategy

This strategy start from the left, and checks for a GenWiki page that matches just the first segment, then the first two segments, then the first three segments, then four, five, etc. The largest continuous set of segments that match is turned into a GenWiki link. Then, the search starts again at the first non-matched segment and repeats the search. Segments that do not match a page are simply printed as text.

There are also a few rules to ensure spaces and such are consistent.

  • Spaces between words are converted to underscores
  • Spaces around commas and ends are removed
  • text in parenthesis are removed


Examples

If a GenWiki site was setup such that the following pages exist:

"Tiverton"
"London"
"London,England"
"Kincardine Township"
"Canada"

then:

Example TNG-GenWiki Place links
Original TNG Place Resulting Place Links Resulting GenWiki page(s)
(at home) Tiverton, Ontario, Canada (at home) Tiverton, Ontario, Canada Tiverton & Canada
Tiverton, Kincardine Township, Ontario, Canada Tiverton, Kincardine Township, Ontario, Canada Tiverton & Kincardine_Township
London, Ontario, Canada London, Ontario, Canada London & Canada
Currie Street, London, England Currie Street, London, England London,England


If you are logged into the TNG site, and you are administrator, then a grayed icon will appear at all "Place" locations where a GenWiki page is NOT found. It will appear as below:

"Kincardine, Ontario, Canada"    New doc.gif


Substitution Support

This version also includes support for a dictionary like substituion list. If you have multiple contributors, or have included gedcoms from other sources, you may find your locations strings contain a variety of different abbreviations for places.

The substitution file allows the definition of search and replace pairs to help increase the consistency of place locations when searching for GenWiki pages. A sample set of substitution pairs are included. The example pairs perform replaces like the following:


Place string substitutions
Original TNG Place Resulting Place Links
Detroit,MI,USA Detroit,Michigan,USA
Detroit,MI Detroit,Michigan
London,Eng London,England
London,Eng. London,England


Installation

  1. backup your existing "link_wiki.php"
  2. Download the Media:Wiki_Strategy_1.zip:Strategy 1 zip file
    • It contains two files
      • the replacement "link_wiki.php" file
      • a new file called "substitution_list.php"
  3. extract and edit the "link_wiki.php" file options to match your GenWiki installation
  4. extract and view/edit your custom substitution list
  5. copy the two files to your base TNG directory
  6. enjoy...
Personal tools