{"id":15107722,"url":"https://github.com/pharo-contributions/singularizepluralize","last_synced_at":"2025-10-23T02:31:30.554Z","repository":{"id":88081770,"uuid":"197796273","full_name":"pharo-contributions/SingularizePluralize","owner":"pharo-contributions","description":"Transforming singular nouns to their plural form and vice versa.","archived":false,"fork":false,"pushed_at":"2023-06-08T13:03:35.000Z","size":42,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-09T13:22:14.203Z","etag":null,"topics":["language","natural-language-processing","nlp","pharo","pharo-smalltalk","smalltalk"],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","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/pharo-contributions.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-19T15:17:08.000Z","updated_at":"2024-02-18T16:39:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"3cb716c1-c22f-4fdc-affc-541007ebc588","html_url":"https://github.com/pharo-contributions/SingularizePluralize","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-contributions%2FSingularizePluralize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-contributions%2FSingularizePluralize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-contributions%2FSingularizePluralize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-contributions%2FSingularizePluralize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pharo-contributions","download_url":"https://codeload.github.com/pharo-contributions/SingularizePluralize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868431,"owners_count":16555761,"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":["language","natural-language-processing","nlp","pharo","pharo-smalltalk","smalltalk"],"created_at":"2024-09-25T21:41:13.349Z","updated_at":"2025-10-23T02:31:29.736Z","avatar_url":"https://github.com/pharo-contributions.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SingularizePluralize\n\n[![Build status](https://github.com/pharo-contributions/SingularizePluralize/workflows/CI/badge.svg)](https://github.com/pharo-contributions/SingularizePluralize/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/pharo-contributions/SingularizePluralize/badge.svg?branch=master)](https://coveralls.io/github/pharo-contributions/SingularizePluralize?branch=master)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/pharo-contributions/SingularizePluralize/master/LICENSE)\n\nA simple [Pharo](http://pharo.org/) library for transforming singular nouns to their plural form and vice versa. The implementation is based on the [inflection](https://inflection.readthedocs.io/en/latest/_modules/inflection.html) library in Python.\n\n## Installation\n \nTo install the packages of SingularizePluralize, go to the Playground (Ctrl+OW) in your Pharo image and execute the following Metacello script (select it and press Do-it button or Ctrl+D):\n\n```Smalltalk\nMetacello new\n  baseline: 'SingularizePluralize';\n  repository: 'github://pharo-contributions/SingularizePluralize/src';\n  load.\n```\n\n## How to use it?\n\nThe package simply extends class `String` with two messages: `asSingular` and `asPlural`. Here are some examples of converting singular nouns to their plural forms:\n\n```Smalltalk\n'banana' asPlural. \"bananas\"\n'man' asPlural. \"men\"\n'woman' asPlural. \"women\"\n'matrix' asPlural. \"matrices\"\n'child' asPlural. \"children\"\n'knife' asPlural. \"knives\"\n'thesis' asPlural. \"theses\"\n'auditorium' asPlural. \"auditoria\"\n```\n\nSimilarly, we can convert plural nouns to their singular forms:\n\n```Smalltalk\n'bananas' asSingular. \"banana\"\n'men' asSingular. \"man\"\n'women' asSingular. \"woman\"\n'matrices' asSingular. \"matrix\"\n'children' asSingular. \"child\"\n'knives' asSingular. \"knife\"\n'theses' asSingular. \"thesis\"\n'auditoria' asSingular. \"auditorium\"\n```\n\n## If you find a mistake\n\nNatural languages including English are very complex and irregular. It is hard to capture all rules and exceptions of pluralization with one algorithm. If you try to convert a noun to its singular/plural form and encounter a mistake, please report it by creating an issue with the title **Singular (Plural) of \"X\" should be \"Y\" not \"Z\"**. I will create a rule or add an exception to cover that case.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-contributions%2Fsingularizepluralize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpharo-contributions%2Fsingularizepluralize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-contributions%2Fsingularizepluralize/lists"}