TNG Integration Search1

From Genwiki

Revision as of 22:52, 21 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.


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.

Example Cases:

A GenWiki site is setup such that the following pages exist:

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


Example TNG-GenWiki Place links
Original TNG Place Resulting GenWiki linked Place
Tiverton, Ontario, Canada Tiverton, Ontario, Canada
Tiverton, Kincardine Township, Ontario, Canada Tiverton, Kincardine Township, Ontario, Canada
London, Ontario, Canada London, Ontario, Canada
Currie Street, London, England Currie Street, 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" File:My small doc.gif

Personal tools