Skip to content

Commit

Permalink
Don't match any part of the name in places
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jan 22, 2025
1 parent 6541020 commit cbe129d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -12344,9 +12344,10 @@ sub notes

# Scan the notes for locations to include in the map
if($freegeocoder) {
my @ignore_words = ('church', 'dale', 'law', 'middle');
my @ignore_words = ('church', 'dale', 'law', 'middle', 'back', 'hill', 'british', 'street');
if($person) {
push @ignore_words, given_names($person), $person->surname();
# Don't find places that match the person's name
push @ignore_words, split(/\s/, given_names($person)), $person->surname();
}
@matches = $freegeocoder->geocode(scantext => $rc, region => $region, ignore_words => \@ignore_words);
} elsif($textgeocoder && ($rc =~ /[\s,]/)) {
Expand All @@ -12373,7 +12374,7 @@ sub notes
if(ref($matches) eq 'ARRAY') {
my $text;
if(length($rc) > 15) {
$text = substr($rc, 0, 24) . '...';
$text = substr($rc, 0, 32) . '...';
} else {
$text = $rc;
}
Expand All @@ -12390,11 +12391,11 @@ sub notes
if($match->{'country'} && (uc($match->{'country'}) eq $region)) {
# my $place = $match->{'location'};
if(length($rc) > 15) {
$match->{'text'} = wide_to_html(substr($rc, 0, 24)) . '...';
$match->{'text'} = wide_to_html(substr($rc, 0, 32)) . '...';
} else {
$match->{'text'} = $rc;
}
print __LINE__, ': (DEBUG) ', Data::Dumper->new([$match])->Dump();
print __LINE__, ": (DEBUG)\n\t$rc\n\t", Data::Dumper->new([$match])->Dump();
push @{$note_locations}, $match;
}
}
Expand Down

0 comments on commit cbe129d

Please sign in to comment.