{"id":21520926,"url":"https://github.com/globalwebindex/elm-plural-rules","last_synced_at":"2025-04-09T22:21:35.887Z","repository":{"id":49022745,"uuid":"258326647","full_name":"GlobalWebIndex/elm-plural-rules","owner":"GlobalWebIndex","description":"Abstraction for working with pluralization rules","archived":false,"fork":false,"pushed_at":"2024-08-12T23:18:38.000Z","size":287,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-03-24T00:14:53.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GlobalWebIndex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-23T20:47:33.000Z","updated_at":"2024-08-12T23:18:39.000Z","dependencies_parsed_at":"2024-04-18T15:47:51.294Z","dependency_job_id":"8ab1c0e4-dc27-43b9-b9e2-9704d23152c6","html_url":"https://github.com/GlobalWebIndex/elm-plural-rules","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":0.2272727272727273,"last_synced_commit":"1ffe1dd9f35e21f478439650e1d6ebbd94bf2014"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobalWebIndex%2Felm-plural-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobalWebIndex%2Felm-plural-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobalWebIndex%2Felm-plural-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobalWebIndex%2Felm-plural-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlobalWebIndex","download_url":"https://codeload.github.com/GlobalWebIndex/elm-plural-rules/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248120208,"owners_count":21050907,"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-11-24T01:04:56.167Z","updated_at":"2025-04-09T22:21:35.859Z","avatar_url":"https://github.com/GlobalWebIndex.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `GlobalWebIndex/elm-plural-rules`\n\nAn abstraction for working with pluralization rules.\n\nBased largely on [Unicode Language Plural\nRules](https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_plural_rules.html).\n\n![Screenshot of English\nrules](https://github.com/GlobalWebIndex/elm-plural-rules/raw/master/docs/en.png)\n\n![Screenshot of Czech\nrules](https://github.com/GlobalWebIndex/elm-plural-rules/raw/master/docs/cz.png)\n\n(For the description of what the `v = 0` conditions in the above screenshots\nmean, look at the [Plural Operand Meanings](http://unicode.org/reports/tr35/tr35-numbers.html#Operands)\ntable or check the `Plural Operands` section of the `PluralRules` module!)\n\n----\n\nThis library helps you arrive at an API like:\n\n```elm\npluralize 1 \"message\" --\u003e \"message\"\npluralize 5 \"message\" --\u003e \"messages\"\n\npluralize 1 \"man\" --\u003e \"man\"\npluralize 5 \"man\" --\u003e \"men\"\n\npluralize 1 \"query\" --\u003e \"query\"\npluralize 5 \"query\" --\u003e \"queries\"\n```\n\nSee the `examples/` folder for how to get there!\n\nThere are also helpers for writing pluralization logic for languages not\nincluded in this package. Obviously, there's a lot of languages and each of\nthose has its own rules for how it pluralizes. Check them\n[here!](https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_plural_rules.html)\n\n## Currently supported Languages\n\n* English\n* Czech\n* French\n* Dutch\n\n## FAQ\n\n### Where do the rules come from?\n\nYou're supposed to make your own dictionary of Rules and add words into it as you start using them in the app.\n\nEach language has its own ways of pluralizing words and we've opted out to let you \"grow your own dictionary\" based on the words you're using in your app, because:\n\n  - it would be impractical for the package to contain a whole dictionary in that given language,\n  - and we believe it would be impossible / very impractical to try to implement that behaviour with some kind of function. This is not a NLP package :)\n \nSee [examples/Pluralize.elm](https://github.com/GlobalWebIndex/elm-plural-rules/blob/master/examples/Pluralize.elm) for how rules for specific words can be created.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobalwebindex%2Felm-plural-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobalwebindex%2Felm-plural-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobalwebindex%2Felm-plural-rules/lists"}