{"id":13482414,"url":"https://github.com/gutfeeling/word_forms","last_synced_at":"2026-01-14T09:54:00.271Z","repository":{"id":44985762,"uuid":"73035597","full_name":"gutfeeling/word_forms","owner":"gutfeeling","description":"Accurately generate all possible forms of an English word e.g \"election\" --\u003e \"elect\", \"electoral\", \"electorate\" etc.","archived":false,"fork":false,"pushed_at":"2021-06-24T21:59:57.000Z","size":1265,"stargazers_count":630,"open_issues_count":4,"forks_count":73,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-05-27T08:50:43.472Z","etag":null,"topics":["adjective","adverb","dictionary","lemmatizer","natural-language-processing","nlp","noun","parts-of-speech","stemmer","verb-conjugations","wordnet","words"],"latest_commit_sha":null,"homepage":"","language":"Python","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/gutfeeling.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}},"created_at":"2016-11-07T02:36:23.000Z","updated_at":"2025-05-11T20:06:52.000Z","dependencies_parsed_at":"2022-07-13T04:10:52.401Z","dependency_job_id":null,"html_url":"https://github.com/gutfeeling/word_forms","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/gutfeeling/word_forms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutfeeling%2Fword_forms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutfeeling%2Fword_forms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutfeeling%2Fword_forms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutfeeling%2Fword_forms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gutfeeling","download_url":"https://codeload.github.com/gutfeeling/word_forms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutfeeling%2Fword_forms/sbom","scorecard":{"id":450222,"data":{"date":"2025-08-11","repo":{"name":"github.com/gutfeeling/word_forms","commit":"1ad4b74a15093c0ab996b99639f7a963c5974f44"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":4,"reason":"Found 8/19 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T08:01:28.706Z","repository_id":44985762,"created_at":"2025-08-19T08:01:28.706Z","updated_at":"2025-08-19T08:01:28.706Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["adjective","adverb","dictionary","lemmatizer","natural-language-processing","nlp","noun","parts-of-speech","stemmer","verb-conjugations","wordnet","words"],"created_at":"2024-07-31T17:01:01.758Z","updated_at":"2026-01-14T09:54:00.249Z","avatar_url":"https://github.com/gutfeeling.png","language":"Python","readme":"\u003cimg src=\"https://github.com/gutfeeling/word_forms/raw/master/logo.png\" alt=\"word forms logo\" width=\"500\"\u003e\n\n## Accurately generate all possible forms of an English word\n\nWord forms can accurately generate all possible forms of an English word. It can conjugate verbs. It can connect different\nparts of speeches e.g noun to adjective, adjective to adverb, noun to verb etc. It can pluralize singular nouns. It does this all in one function. Enjoy!\n\n## Examples\n\nSome very timely examples :-P\n\n```python\n\u003e\u003e\u003e from word_forms.word_forms import get_word_forms\n\u003e\u003e\u003e get_word_forms(\"president\")\n\u003e\u003e\u003e {'n': {'presidents', 'presidentships', 'presidencies', 'presidentship', 'president', 'presidency'},\n     'a': {'presidential'},\n     'v': {'preside', 'presided', 'presiding', 'presides'},\n     'r': {'presidentially'}}\n\u003e\u003e\u003e get_word_forms(\"elect\")\n\u003e\u003e\u003e {'n': {'elects', 'electives', 'electors', 'elect', 'eligibilities', 'electorates', 'eligibility', 'elector', 'election', 'elections', 'electorate', 'elective'},\n     'a': {'eligible', 'electoral', 'elective', 'elect'},\n     'v': {'electing', 'elects', 'elected', 'elect'},\n     'r': set()}\n\u003e\u003e\u003e get_word_forms(\"politician\")\n\u003e\u003e\u003e {'n': {'politician', 'politics', 'politicians'},\n     'a': {'political'},\n     'v': set(),\n     'r': {'politically'}}\n\u003e\u003e\u003e get_word_forms(\"am\")\n\u003e\u003e\u003e {'n': {'being', 'beings'},\n     'a': set(),\n     'v': {'was', 'be', \"weren't\", 'am', \"wasn't\", \"aren't\", 'being', 'were', 'is', \"isn't\", 'been', 'are', 'am not'},\n     'r': set()}\n\u003e\u003e\u003e get_word_forms(\"ran\")\n\u003e\u003e\u003e {'n': {'run', 'runniness', 'runner', 'runninesses', 'running', 'runners', 'runnings', 'runs'},\n     'a': {'running', 'runny'},\n     'v': {'running', 'run', 'ran', 'runs'},\n     'r': set()}\n\u003e\u003e\u003e get_word_forms('continent', 0.8) # with configurable similarity threshold\n\u003e\u003e\u003e {'n': {'continents', 'continency', 'continences', 'continent', 'continencies', 'continence'},\n     'a': {'continental', 'continent'},\n     'v': set(),\n     'r': set()}\n```\nAs you can see, the output is a dictionary with four keys. \"r\" stands for adverb, \"a\" for adjective, \"n\" for noun\nand \"v\" for verb. Don't ask me why \"r\" stands for adverb. This is what WordNet uses, so this is why I use it too :-)\n\nHelp can be obtained at any time by typing the following:\n\n```python\n\u003e\u003e\u003e help(get_word_forms)\n```\n\n## Why?\nIn Natural Language Processing and Search, one often needs to treat words like \"run\" and \"ran\", \"love\" and \"lovable\"\nor \"politician\" and \"politics\" as the same word. This is usually done by algorithmically reducing each word into a\nbase word and then comparing the base words. The process is called Stemming.\nFor example, the [Porter Stemmer](http://text-processing.com/demo/stem/) reduces both \"love\" and \"lovely\"\ninto the base word \"love\".\n\nStemmers have several shortcomings. Firstly, the base word produced by the Stemmer is not always a valid English word.\nFor example, the Porter Stemmer reduces the word \"operation\" to \"oper\". Secondly, the Stemmers have a high false negative rate.\nFor example, \"run\" is reduced to \"run\" and \"ran\" is reduced to \"ran\". This happens because the Stemmers use a set of\nrational rules for finding the base words, and as we all know, the English language does not always behave very rationally.\n\nLemmatizers are more accurate than Stemmers because they produce a base form that is present in the dictionary (also called the Lemma). So the reduced word is always a valid English word. However, Lemmatizers also have false negatives because they are not very good at connecting words across different parts of speeches. The [WordNet Lemmatizer](http://textanalysisonline.com/nltk-wordnet-lemmatizer) included with NLTK fails at almost all such examples. \"operations\" is reduced to \"operation\"  and \"operate\" is reduced to \"operate\".\n\nWord Forms tries to solve this problem by finding all possible forms of a given English word. It can perform verb conjugations, connect noun forms to verb forms, adjective forms, adverb forms, plularize singular forms etc.\n\n## Bonus: A simple lemmatizer\n\nWe also offer a very simple lemmatizer based on ``word_forms``. Here is how to use it.\n\n```python\n\u003e\u003e\u003e from word_forms.lemmatizer import lemmatize\n\u003e\u003e\u003e lemmatize(\"operations\")\n'operant'\n\u003e\u003e\u003e lemmatize(\"operate\")\n'operant'\n```\n\nEnjoy!\n\n## Compatibility\n\nTested on Python 3\n\n## Installation\n\nUsing `pip`:\n\n```\npip install -U word_forms\n```\n\n### From source\nOr you can install it from source:\n\n1. Clone the repository:\n\n```\ngit clone https://github.com/gutfeeling/word_forms.git\n```\n\n2. Install it using `pip` or `setup.py`\n\n```\npip install -e word_forms\n% or\ncd word_forms\npython setup.py install\n```\n\n## Acknowledgement\n\n1. [The XTAG project](http://www.cis.upenn.edu/~xtag/) for information on [verb conjugations](word_forms/en-verbs.txt).\n2. [WordNet](http://wordnet.princeton.edu/)\n\n## Maintainer\n\nHi, I am Dibya and I maintain this repository. I would love to hear from you. Feel free to get in touch with me\nat dibyachakravorty@gmail.com.\n\n## Contributors\n\n- Tom Aarsen @CubieDev is a major contributor and is singlehandedly responsible for v2.0.0.\n- Sajal Sharma @sajal2692 ia a major contributor.\n- Pamphile Roy @tupui is responsible for the PyPI package.\n\n## Contributions\n\nWord Forms is not perfect. In particular, a couple of aspects can be improved.\n\n1. It sometimes generates non dictionary words like \"runninesses\" because the pluralization/singularization algorithm is\nnot perfect. At the moment, I am using [inflect](https://pypi.python.org/pypi/inflect) for it.\n\nIf you like this package, feel free to contribute. Your pull requests are most welcome.\n","funding_links":[],"categories":["Libraries","函式庫","Python","APIs and Libraries"],"sub_categories":["Videos and Online Courses","書籍","Knowledge Graphs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgutfeeling%2Fword_forms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgutfeeling%2Fword_forms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgutfeeling%2Fword_forms/lists"}