Difference between revisions of "TNG Integration Search1"

From Genwiki

Jump to: navigation, search
(Place String Search / Match Strategy 1)
(Place String Search / Match Strategy 1)
Line 34: Line 34:
 
{| border="1"
 
{| border="1"
 
|+ ''Example TNG-GenWiki Place links''
 
|+ ''Example TNG-GenWiki Place links''
!width="200" align="center"|Original TNG Place
+
!width="200"|Original TNG Place
!width="200" align="center"||GenWiki linked Place
+
!width="200"|GenWiki linked Place
 
|-
 
|-
 
| Tiverton, Ontario, Canada || <u>Tiverton</u>, Ontario, Canada ||
 
| Tiverton, Ontario, Canada || <u>Tiverton</u>, Ontario, Canada ||
 
|}
 
|}

Revision as of 22:43, 21 July 2006

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"
"Kincardine Township"
"Canada"


Example TNG-GenWiki Place links
Original TNG Place GenWiki linked Place
Tiverton, Ontario, Canada Tiverton, Ontario, Canada
Personal tools