There is an ongoing outage on the primary CPAN mirror. It is possible to work around the issue by using MetaCPAN as a mirror.

NAME

Genealogy::Obituary::Parser - Extract structured family relationships from obituary text

VERSION

Version 0.03

SYNOPSIS

use Genealogy::Obituary::Parse qw(parse_obituary);

my $text = 'She is survived by her husband Paul, daughters Anna and Lucy, and grandchildren Jake and Emma.';
my $data = parse_obituary($text);

# $data = {
#   spouse   => ['Paul'],
#   children => ['Anna', 'Lucy'],
#   grandchildren => ['Jake', 'Emma'],
# };

DESCRIPTION

This module parses freeform obituary text and extracts structured family relationship data for use in genealogical applications. It parses obituary text and extract structured family relationship data, including details about children, parents, spouse, siblings, grandchildren, and other relatives.

FUNCTIONS

parse_obituary($text)

The routine processes the obituary content to identify and organize relevant family information into a clear, structured hash. It returns a hash reference containing structured family information, with each family member's data organized into distinct categories such as children, spouse, parents, siblings, etc.

Takes a string, or a ref to a string.

API SPECIFICATION

INPUT

{
  'text' => {
    'type' => 'string',	# or stringref
    'min' => 1,
    'max' => 10000
  }
}

OUTPUT

  • No matches: undef

{
  type => 'hashref',
  'min' => 1,
  'max' => 10
}

AUTHOR

Nigel Horne, <njh at nigelhorne.com>

SEE ALSO

Test coverage report: https://nigelhorne.github.io/Genealogy-Obituary-Parser/coverage/

SUPPORT

This module is provided as-is without any warranty.

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.