Lingua::EN::GivenNames::Database - An SQLite database of derivations of English given names
See "Synopsis" in Lingua::EN::GivenNames for a long synopsis.
See also "How do the scripts and modules interact to produce the data?" in Lingua::EN::GivenNames.
Documents the methods end-users need to access the SQLite database, lingua.en.givennames.sqlite, which ships with this distro.
See "Description" in Lingua::EN::GivenNames for a long description. See also scripts/*.pl.
This module is available as a Unix-style distro (*.tgz).
See http://savage.net.au/Perl-modules.html for details.
See http://savage.net.au/Perl-modules/html/installing-a-module.html for help on unpacking and installing.
new(...) returns an object of type Lingua::EN::GivenNames::Database.
Lingua::EN::GivenNames::Database
This is the class's contructor.
Usage: Lingua::EN::GivenNames::Database -> new().
Lingua::EN::GivenNames::Database -> new()
This method takes a hash of options.
Call new() as new(option_1 => value_1, option_2 => value_2, ...).
new()
new(option_1 => value_1, option_2 => value_2, ...)
Available options:
This is the hashref of attributes passed to DBI's connect() method.
Default: {AutoCommit => 1, RaiseError => 1, sqlite_unicode => 1}
Used to specify a given name which scripts/report.name.pl uses as a key into the database.
Default: ''.
See "report_name([$name])" below for sample code.
This module is a sub-class of Lingua::EN::GivenNames and consequently inherits its methods.
Get or set the hashref of attributes passes to DBI's connect() method.
Also, attributes is an option to "new()".
Returns the result of: 'select count(*) from names'.
Returns a hashref where the keys are the English singluar versions of the names of the table, and the values are the actual table names.
Returns a hashref whose keys are the table names as returned by sub get_table_names().
The values for these keys are hashrefs of all the data in the corresponding table, as returned by DBIx::Table2Hash's select_hashref() method.
These nested hashrefs are keys by the primary key (integer) of each table.
Consequently, get_tables() returns all data for all tables.
See the source code for sub read_names_table() for how to access such data.
Gets and sets the name attribute, as used by scripts/report.name.pl.
Also, name is an option to "new()".
See "Constructor and initialization".
Returns a hashref of the number of web pages dedicated to female and male names:
{ female => 20, male => 17, }
Used by Lingua::EN::GivenNames::Database::Download.
Returns an arrayref of hashrefs of names, sorted by fc_name.
Each element in @$names contains data for 1 record in the database, and has these keys (in alphabetical order):
{ derivation => The derivation, fc_name => The case-folded name, form => The form, id => The primary key of this record, kind => The kind, meaning => The meaning, name => The name, original => The original (name), rating => The rating (relability indicator), sex => The sex, source => The source (language or name), }
This is discussed further in "Basic Usage" in Lingua::EN::GivenNames and "FAQ" in Lingua::EN::GivenNames.
Here, [] indicate an optional parameter.
Prints the result of searching the names table for a name specified either with the $name parameter, or via the name parameter to "new()".
Sample usage:
perl scripts/report.name.pl -n Zoe outputs: derivation Greek name, meaning "life" fc_name zoe form name id 3962 kind Greek meaning "life" name Zoe original - rating meaning sex female source -
Currently prints these database statistics:
Table Records derivations 3062 forms 15 kinds 52 meanings 1356 names 3967 originals 2393 ratings 5 sexes 2 sources 56
This uses Lingua::EN::StopWordList to report any stop words which happened to be picked up by the regexps used to parse the web page data.
Currently prints this report:
Table 'sources' contains these stop words: of Table 'forms' contains these stop words: from, name
For the database schema, etc, see "FAQ" in Lingua::EN::GivenNames.
See "References" in Lingua::EN::GivenNames.
Email the author, or log a bug on RT:
https://rt.cpan.org/Public/Dist/Display.html?Name=Lingua::EN::GivenNames.
Lingua::EN::GivenNames was written by Ron Savage <ron@savage.net.au> in 2012.
Lingua::EN::GivenNames
Home page: http://savage.net.au/index.html.
Australian copyright (c) 2012 Ron Savage.
All Programs of mine are 'OSI Certified Open Source Software'; you can redistribute them and/or modify them under the terms of The Artistic License, a copy of which is available at: http://www.opensource.org/licenses/index.html
To install Lingua::EN::GivenNames, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::EN::GivenNames
CPAN shell
perl -MCPAN -e shell install Lingua::EN::GivenNames
For more information on module installation, please visit the detailed CPAN module installation guide.