{"id":13508697,"url":"https://github.com/petrovich/petrovich_elixir","last_synced_at":"2025-04-13T05:34:53.694Z","repository":{"id":48287715,"uuid":"93631850","full_name":"petrovich/petrovich_elixir","owner":"petrovich","description":"Elixir library to inflect Russian first, last, and middle names.","archived":false,"fork":false,"pushed_at":"2021-08-03T08:11:49.000Z","size":174,"stargazers_count":39,"open_issues_count":3,"forks_count":2,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-10-01T15:43:41.790Z","etag":null,"topics":["elixir","inflection","petrovich"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/petrovich_elixir/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petrovich.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"sobolevn","github":"wemake-services"}},"created_at":"2017-06-07T12:17:04.000Z","updated_at":"2023-03-25T20:53:28.000Z","dependencies_parsed_at":"2022-09-15T09:21:45.276Z","dependency_job_id":null,"html_url":"https://github.com/petrovich/petrovich_elixir","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrovich%2Fpetrovich_elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrovich%2Fpetrovich_elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrovich%2Fpetrovich_elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrovich%2Fpetrovich_elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petrovich","download_url":"https://codeload.github.com/petrovich/petrovich_elixir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219846912,"owners_count":16556420,"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":["elixir","inflection","petrovich"],"created_at":"2024-08-01T02:00:57.140Z","updated_at":"2024-10-14T19:04:08.828Z","avatar_url":"https://github.com/petrovich.png","language":"Elixir","funding_links":["https://patreon.com/sobolevn","https://github.com/sponsors/wemake-services"],"categories":["Natural Language Processing (NLP)"],"sub_categories":[],"readme":"# petrovic_elixir\n\n[![petrovich](https://camo.githubusercontent.com/4555ec1b7aa15e0cd22f8ff619c965da0596399a/68747470733a2f2f7261772e6769746875622e636f6d2f726f637363692f706574726f766963682f6d61737465722f706574726f766963682e706e67)](https://github.com/petrovich/petrovich_elixir)\n\n[![test](https://github.com/petrovich/petrovich_elixir/workflows/test/badge.svg)](https://github.com/petrovich/petrovich_elixir/actions?query=workflow%3Atest)\n[![Coverage Status](https://coveralls.io/repos/github/petrovich/petrovich_elixir/badge.svg?branch=master)](https://coveralls.io/github/petrovich/petrovich_elixir?branch=master)\n[![Hex Version](https://img.shields.io/hexpm/v/petrovich_elixir.svg)](https://hex.pm/packages/petrovich_elixir)\n[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n\nElixir library to inflect Russian first, last, and middle names.\n\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:petrovich_elixir, \"~\u003e 1.0\"}\n  ]\nend\n```\n\n\n## Usage\n\n### Do I need to know Russian to use it?\n\nYes, you will need some basic Russian knowledge to work with this library.\nYou need to understand how [grammatical cases](https://en.wikipedia.org/wiki/Grammatical_case) work in Russian language.\n\n### Inflection\n\n```elixir\nPetrovich.firstname!(\"Александр\", :accusative)\n# =\u003e Александра\n\nPetrovich.middlename!(\"Сергеевич\", :accusative)\n# =\u003e Сергеевича\n\nPetrovich.lastname!(\"Пушкин\", :accusative, :male)\n# =\u003e Пушкина\n```\n\n### Gender detection\n\n```elixir\nalias Petrovich.Detector\n\nDetector.detect_gender(\"Александр\", :firstname)\n# =\u003e {:ok, \"male\"}\n```\n\n\n## Configuration\n\nYou will need to add these lines into your `config.exs`:\n\n```elixir\nconfig :petrovich_elixir,\n  rules_path: \"rules/rules.json\",\n  gender_path: \"rules/gender.json\",\n  json_codec: Jason\n```\n\nYou can swap our default ([`Jason`](https://github.com/michalmuskala/jason))\ncodec to any of your choice.\n\n\n## Rules\n\nThis package uses [`petrovich-rules`](https://github.com/petrovich/petrovich-rules) as the source for all transformations. If you ever experience wrong result or other issues with the data itself, please open an issue [here](https://github.com/petrovich/petrovich-rules/issues).\n\n\n## License\n\nMIT. See [LICENSE](/LICENSE) for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrovich%2Fpetrovich_elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetrovich%2Fpetrovich_elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrovich%2Fpetrovich_elixir/lists"}