{"id":19900585,"url":"https://github.com/gobuffalo/flect","last_synced_at":"2025-05-15T23:07:12.131Z","repository":{"id":33249070,"uuid":"142668115","full_name":"gobuffalo/flect","owner":"gobuffalo","description":"An inflection engine for golang","archived":false,"fork":false,"pushed_at":"2024-09-21T13:44:15.000Z","size":171,"stargazers_count":103,"open_issues_count":4,"forks_count":31,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-14T04:37:49.664Z","etag":null,"topics":["go","gobuffalo","golang","inflection"],"latest_commit_sha":null,"homepage":"https://gobuffalo.io","language":"Go","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/gobuffalo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"markbates","patreon":"buffalo"}},"created_at":"2018-07-28T10:22:43.000Z","updated_at":"2025-05-13T15:33:30.000Z","dependencies_parsed_at":"2024-06-18T12:36:27.726Z","dependency_job_id":"ff1aa2d8-870b-42c5-b4a1-6ebac00ce50f","html_url":"https://github.com/gobuffalo/flect","commit_stats":{"total_commits":133,"total_committers":22,"mean_commits":6.045454545454546,"dds":0.6165413533834587,"last_synced_commit":"cbe6b825af4220a1f410479237d9cae6e301a8cb"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobuffalo%2Fflect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobuffalo%2Fflect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobuffalo%2Fflect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobuffalo%2Fflect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gobuffalo","download_url":"https://codeload.github.com/gobuffalo/flect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436948,"owners_count":22070947,"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","gobuffalo","golang","inflection"],"created_at":"2024-11-12T20:12:42.068Z","updated_at":"2025-05-15T23:07:06.777Z","avatar_url":"https://github.com/gobuffalo.png","language":"Go","funding_links":["https://github.com/sponsors/markbates","https://patreon.com/buffalo"],"categories":[],"sub_categories":[],"readme":"# Flect\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/gobuffalo/flect.svg)](https://pkg.go.dev/github.com/gobuffalo/flect)\n[![Standard Test](https://github.com/gobuffalo/flect/actions/workflows/standard-go-test.yml/badge.svg)](https://github.com/gobuffalo/flect/actions/workflows/standard-go-test.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gobuffalo/flect)](https://goreportcard.com/report/github.com/gobuffalo/flect)\n\nThis is a new inflection engine to replace [https://github.com/markbates/inflect](https://github.com/markbates/inflect) designed to be more modular, more readable, and easier to fix issues on than the original.\n\nFlect provides word inflection features such as `Singularize` and `Pluralize`\nfor English nouns and text utility features such as `Camelize`, `Capitalize`,\n`Humanize`, and more.\n\nDue to the flexibly-complex nature of English noun inflection, it is almost\nimpossible to cover all exceptions (such as identical/irregular plural).\nWith this reason along with the main purpose of Flect, which is to make it\neasy to develop web application in Go, Flect has limitations with its own\nrules.\n\n* It covers regular rule (adding -s or -es and of the word)\n* It covers well-known irregular rules (such as -is to -es, -f to -ves, etc)\n  * https://en.wiktionary.org/wiki/Appendix:English_irregular_nouns#Rules\n* It covers well-known irregular words (such as children, men, etc)\n* If a word can be countable and uncountable like milk or time, it will be\n  treated as countable.\n* If a word has more than one plural forms, which means it has at least one\n  irregular plural, we tried to find most popular one. (The selected plural\n  could be odd to you, please feel free to open an issue with back data)\n  * For example, we selected \"stadiums\" over \"stadia\", \"dwarfs\" over \"dwarves\"\n  * One or combination of en.wiktionary.org, britannica.com, and\n    trends.google.com are used to check the recent usage trends.\n* However, we cannot cover all cases and some of our cases could not fit with\n  your situation. You can override the default with functions such as\n  `InsertPlural()`, `InsertSingular()`, or `LoadInfrections()`.\n* If you have a json file named `inflections.json` in your application root,\n  the file will be automatically loaded as your custom inflection dictionary.\n\n## Installation\n\n```console\n$ go get github.com/gobuffalo/flect\n```\n\n\n## Packages\n\n### `github.com/gobuffalo/flect`\n\nThe `github.com/gobuffalo/flect` package contains \"basic\" inflection tools, like pluralization, singularization, etc...\n\n#### The `Ident` Type\n\nIn addition to helpful methods that take in a `string` and return a `string`, there is an `Ident` type that can be used to create new, custom, inflection rules.\n\nThe `Ident` type contains two fields.\n\n* `Original` - This is the original `string` that was used to create the `Ident`\n* `Parts` - This is a `[]string` that represents all of the \"parts\" of the string, that have been split apart, making the segments easier to work with\n\nExamples of creating new inflection rules using `Ident` can be found in the `github.com/gobuffalo/flect/name` package.\n\n### `github.com/gobuffalo/flect/name`\n\nThe `github.com/gobuffalo/flect/name` package contains more \"business\" inflection rules like creating proper names, table names, etc...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobuffalo%2Fflect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgobuffalo%2Fflect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobuffalo%2Fflect/lists"}