{"id":17109610,"url":"https://github.com/monken/dbix-class-phoneticsearch","last_synced_at":"2025-03-23T21:41:35.207Z","repository":{"id":580305,"uuid":"213287","full_name":"monken/DBIx-Class-PhoneticSearch","owner":"monken","description":"DBIx::Class::PhoneticSearch","archived":false,"fork":false,"pushed_at":"2009-06-29T16:07:08.000Z","size":88,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-29T05:13:39.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"rackspace/gophercloud","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monken.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-05-29T09:59:38.000Z","updated_at":"2014-09-08T20:13:25.000Z","dependencies_parsed_at":"2022-07-08T02:06:47.156Z","dependency_job_id":null,"html_url":"https://github.com/monken/DBIx-Class-PhoneticSearch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monken%2FDBIx-Class-PhoneticSearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monken%2FDBIx-Class-PhoneticSearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monken%2FDBIx-Class-PhoneticSearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monken%2FDBIx-Class-PhoneticSearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monken","download_url":"https://codeload.github.com/monken/DBIx-Class-PhoneticSearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245175323,"owners_count":20572781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T16:23:47.825Z","updated_at":"2025-03-23T21:41:35.181Z","avatar_url":"https://github.com/monken.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    DBIx::Class::PhoneticSearch - Phonetic search with DBIC\n\nSYNOPSIS\n        package MySchema::User;\n  \n        use base 'DBIx::Class';\n\n        __PACKAGE__-\u003eload_components(qw(PhoneticSearch Core));\n\n        __PACKAGE__-\u003etable('user');\n\n        __PACKAGE__-\u003eadd_columns(\n          id       =\u003e { data_type =\u003e 'integer', auto_increment =\u003e 1, },\n          surname  =\u003e { data_type =\u003e 'character varying', \n                        phonetic_search =\u003e 1 },\n          forename =\u003e { data_type =\u003e 'character varying', \n                        phonetic_search =\u003e { algorithm =\u003e 'Koeln', \n                                             no_indices =\u003e 1 } },\n      \n        );\n\n        __PACKAGE__-\u003eset_primary_key('id');\n\n        __PACKAGE__-\u003eresultset_class('DBIx::Class::ResultSet::PhoneticSearch');\n    \n      # somewhere else\n      $rs = $schema-\u003eresultset('User');\n      $rs-\u003ecreate({ forename =\u003e 'John', surname =\u003e 'Night' });\n  \n      $rs-\u003esearch_phonetic({ forename =\u003e 'Jon' })-\u003efirst-\u003eforename;  # John\n      $rs-\u003esearch_phonetic({ surname =\u003e 'Knight' })-\u003efirst-\u003esurname; # Night\n      $rs-\u003esearch_phonetic({ forename =\u003e 'Jon', \n                             surname =\u003e 'Knight' })-\u003efirst-\u003esurname; # Night\n      $rs-\u003esearch_phonetic([ surname =\u003e 'Smith' ,\n                             surname =\u003e 'Knight' ])-\u003efirst-\u003esurname; # Night (ORed)\n  \nDESCRIPTION\n    This components allows for phonetic search of columns. If you add the\n    `phonetic_search' attribute to a column, this component will add an\n    extra column to the result class which is basically an index of the\n    value based on its pronunciation. Every time the column is updated, the\n    phonetic column is set as well. It uses Text::Phonetic to compute the\n    phonetic representation of the value in that column. Use search_phonetic\n    to search for rows which sound similar to a given value.\n\n    The name of the phonetic column consists of the original column name and\n    the algorithm used:\n\n      $column + _phonetic_ + $algorithm\n\n    The above example will require two additional columns:\n\n      surname_phonetic_phonix character varying,\n      forename_phonetic_koeln character varying,\n  \n    Make sure they exist in you database!\n\n    The default algorithm is Text::Phonetic::Phonix.\n\n    This component will also add indices for both the column and the\n    phonetic column. This can be disabled by setting no_indices.\n\n    To set the phonetic column on an already populated resultset use\n    update_phonetic_columns.\n\nRESULTSET METHODS\n  search_phonetic\n    This method is used to search a resultset for a given set of\n    column/value pairs.\n\n    You can call this method with either an arrayref or hashref. Arrayref\n    will cause a query which will join the queries with `OR'. A hashref will\n    join them with an `AND'.\n\n    Returns a DBIx::Class::ResultSet.\n\n  update_phonetic_column\n      $rs-\u003eupdate_phonetic_column('columnname');\n\n    This method will update the phonetic column of a column.\n\n  update_phonetic_columns\n    Calls update_phonetic_column for each column with an phonetic column.\n\nADVANCED CONFIGURATION\n  algorithm\n    Choose one of `DaitchMokotoff DoubleMetaphone Koeln Metaphone Phonem\n    Phonix Soundex SoundexNara'.\n\n    See Text::Phonetic for more details.\n\n    Defaults to `Phonix'.\n\n  no_indices\n    By default this module will create indices on both the source column and\n    the phonetic column. Set this attribute to a true value to disable this\n    behaviour.\n\nOVERWRITTEN RESULT METHODS\n  register_column\n    Set up the environment and add the phonetic columns.\n\n  store_column\n    Set the phonetic column to the encoded value.\n\n  sqlt_deploy_hook\n    This is where the indices are created.\n\nAUTHOR\n    Moritz Onken, `\u003conken at netcubed.de\u003e'\n\nBUGS\n    Please report any bugs or feature requests to\n    `bug-dbix-class-phoneticsearch at rt.cpan.org', or through the web\n    interface at\n    http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DBIx-Class-PhoneticSearch\n    . I will be notified, and then you'll automatically be notified of\n    progress on your bug as I make changes.\n\nSUPPORT\n    You can find documentation for this module with the perldoc command.\n\n        perldoc DBIx::Class::PhoneticSearch\n\n    You can also look for information at:\n\n    * RT: CPAN's request tracker\n        http://rt.cpan.org/NoAuth/Bugs.html?Dist=DBIx-Class-PhoneticSearch\n\n    * AnnoCPAN: Annotated CPAN documentation\n        http://annocpan.org/dist/DBIx-Class-PhoneticSearch\n\n    * CPAN Ratings\n        http://cpanratings.perl.org/d/DBIx-Class-PhoneticSearch\n\n    * Search CPAN\n        http://search.cpan.org/dist/DBIx-Class-PhoneticSearch/\n\nCOPYRIGHT \u0026 LICENSE\n    Copyright 2009 Moritz Onken, all rights reserved.\n\n    This program is free software; you can redistribute it and/or modify it\n    under the same terms as Perl itself.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonken%2Fdbix-class-phoneticsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonken%2Fdbix-class-phoneticsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonken%2Fdbix-class-phoneticsearch/lists"}