{"id":13693708,"url":"https://github.com/jinzhu/inflection","last_synced_at":"2025-05-14T19:08:38.470Z","repository":{"id":35015531,"uuid":"39115690","full_name":"jinzhu/inflection","owner":"jinzhu","description":"Pluralizes and singularizes English nouns","archived":false,"fork":false,"pushed_at":"2023-10-16T08:40:02.000Z","size":29,"stargazers_count":510,"open_issues_count":8,"forks_count":68,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-14T02:15:38.497Z","etag":null,"topics":["go","golang","inflection"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Azure/azure-sdk-for-node","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jinzhu.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-07-15T04:10:01.000Z","updated_at":"2025-05-09T11:28:44.000Z","dependencies_parsed_at":"2024-01-13T22:55:11.184Z","dependency_job_id":"d893da0d-9d66-4806-b1e8-d6f02e7029b3","html_url":"https://github.com/jinzhu/inflection","commit_stats":{"total_commits":23,"total_committers":12,"mean_commits":"1.9166666666666667","dds":0.5652173913043479,"last_synced_commit":"b5281034e75ed100658f8d9d0b2837f3fad4e8b3"},"previous_names":["qor/inflection"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinzhu%2Finflection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinzhu%2Finflection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinzhu%2Finflection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jinzhu%2Finflection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jinzhu","download_url":"https://codeload.github.com/jinzhu/inflection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254209859,"owners_count":22032897,"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":["go","golang","inflection"],"created_at":"2024-08-02T17:01:15.880Z","updated_at":"2025-05-14T19:08:37.563Z","avatar_url":"https://github.com/jinzhu.png","language":"Go","funding_links":[],"categories":["开源类库","Open source library","Go"],"sub_categories":["文本处理","Word Processing"],"readme":"# Inflection\n\nInflection pluralizes and singularizes English nouns\n\n[![Build Status](https://github.com/jinzhu/inflection/actions/workflows/go.yml/badge.svg)](https://github.com/jinzhu/inflection/actions/workflows/go.yml)\n\n## Basic Usage\n\n```go\ninflection.Plural(\"person\") =\u003e \"people\"\ninflection.Plural(\"Person\") =\u003e \"People\"\ninflection.Plural(\"PERSON\") =\u003e \"PEOPLE\"\ninflection.Plural(\"bus\")    =\u003e \"buses\"\ninflection.Plural(\"BUS\")    =\u003e \"BUSES\"\ninflection.Plural(\"Bus\")    =\u003e \"Buses\"\n\ninflection.Singular(\"people\") =\u003e \"person\"\ninflection.Singular(\"People\") =\u003e \"Person\"\ninflection.Singular(\"PEOPLE\") =\u003e \"PERSON\"\ninflection.Singular(\"buses\")  =\u003e \"bus\"\ninflection.Singular(\"BUSES\")  =\u003e \"BUS\"\ninflection.Singular(\"Buses\")  =\u003e \"Bus\"\n\ninflection.Plural(\"FancyPerson\") =\u003e \"FancyPeople\"\ninflection.Singular(\"FancyPeople\") =\u003e \"FancyPerson\"\n```\n\n## Register Rules\n\nStandard rules are from Rails's ActiveSupport (https://github.com/rails/rails/blob/master/activesupport/lib/active_support/inflections.rb)\n\nIf you want to register more rules, follow:\n\n```go\ninflection.AddUncountable(\"fish\")\ninflection.AddIrregular(\"person\", \"people\")\ninflection.AddPlural(\"(bu)s$\", \"${1}ses\") // \"bus\" =\u003e \"buses\" / \"BUS\" =\u003e \"BUSES\" / \"Bus\" =\u003e \"Buses\"\ninflection.AddSingular(\"(bus)(es)?$\", \"${1}\") // \"buses\" =\u003e \"bus\" / \"Buses\" =\u003e \"Bus\" / \"BUSES\" =\u003e \"BUS\"\n```\n\n## Contributing\n\nYou can help to make the project better, check out [http://gorm.io/contribute.html](http://gorm.io/contribute.html) for things you can do.\n\n## Author\n\n**jinzhu**\n\n* \u003chttp://github.com/jinzhu\u003e\n* \u003cwosmvp@gmail.com\u003e\n* \u003chttp://twitter.com/zhangjinzhu\u003e\n\n## License\n\nReleased under the [MIT License](http://www.opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinzhu%2Finflection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjinzhu%2Finflection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjinzhu%2Finflection/lists"}