{"id":16982315,"url":"https://github.com/maxpatiiuk/porter-stemming","last_synced_at":"2025-03-22T15:30:41.213Z","repository":{"id":159037027,"uuid":"634395224","full_name":"maxpatiiuk/porter-stemming","owner":"maxpatiiuk","description":"TypeScript implementation of the Porter Stemmer algorithm","archived":false,"fork":false,"pushed_at":"2024-06-23T01:39:03.000Z","size":678,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T12:47:17.223Z","etag":null,"topics":["porter","stemmer","stemming"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/maxpatiiuk.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":"2023-04-30T01:14:18.000Z","updated_at":"2024-09-13T13:08:10.000Z","dependencies_parsed_at":"2023-12-03T22:21:20.473Z","dependency_job_id":"4e63104d-0c3d-467c-9a67-64008813d83c","html_url":"https://github.com/maxpatiiuk/porter-stemming","commit_stats":null,"previous_names":["maxpatiiuk/porter-stemming","maxxxxxdlp/porter-stemming"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxpatiiuk%2Fporter-stemming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxpatiiuk%2Fporter-stemming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxpatiiuk%2Fporter-stemming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxpatiiuk%2Fporter-stemming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxpatiiuk","download_url":"https://codeload.github.com/maxpatiiuk/porter-stemming/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244978385,"owners_count":20541844,"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":["porter","stemmer","stemming"],"created_at":"2024-10-14T02:07:57.166Z","updated_at":"2025-03-22T15:30:40.661Z","avatar_url":"https://github.com/maxpatiiuk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Porter Stemmer\n\nThis is a TypeScript implementation\nof [The Porter Stemming Algorithm](https://tartarus.org/martin/PorterStemmer/),\na popular and efficient algorithm used for word stemming in information\nretrieval and natural language processing.\n\nWord stemming is the process of reducing a word to its base or root form, making\nit easier to identify related words and analyze texts more effectively.\n\n## Installation\n\nTo install the package, run the following command:\n\n```bash\nnpm install porterstem\n```\n\n## Usage\n\nTo use the Porter Stemming Algorithm in your TypeScript or JavaScript project,\nsimply import the stem function from the package and apply it to a word or an\narray of words:\n\n```typescript\nimport { stem } from 'porterstem';\n\n// Single word\nconst word = 'running';\nconst stemmedWord = stem(word);\nconsole.log(stemmedWord); // Output: 'run'\n\n// Array of words\nconst words = ['jumps', 'jumped', 'jumping'];\nconst stemmedWords = words.map(word =\u003e stem(word));\nconsole.log(stemmedWords); // Output: ['jump', 'jump', 'jump']\n```\n\n# About the Porter Stemming Algorithm\n\nThe Porter Stemming Algorithm, developed by Martin Porter in 1980, is an\nalgorithm used for stemming words in the English language. It works by removing\nthe common morphological and inflectional endings from words, such as plurals,\npast tenses, and gerunds.\n\nThe algorithm consists of five phases of word reductions applied sequentially.\nEach phase contains a set of rules that define how to remove or replace a suffix\nbased on the word's structure and length. The result is a stemmed word that\nrepresents the base or root form of the input word.\n\n## Meta\n\nInspired by https://www.npmjs.com/package/stemmer\n\nThe algorithm does not use mutation and is type-safe.\n\nNo external dependencies.\n\nCorrectness is validated using the\n[vocabulary](https://tartarus.org/martin/PorterStemmer/voc.txt)\nand [output pairs](https://tartarus.org/martin/PorterStemmer/output.txt)\nprovided by Martin Porter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxpatiiuk%2Fporter-stemming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxpatiiuk%2Fporter-stemming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxpatiiuk%2Fporter-stemming/lists"}