{"id":23154554,"url":"https://github.com/kampsy/gwizo","last_synced_at":"2025-08-17T22:31:38.017Z","repository":{"id":257825994,"uuid":"52120796","full_name":"kampsy/gwizo","owner":"kampsy","description":"Simple Go implementation of the Porter Stemmer algorithm with powerful features.","archived":false,"fork":false,"pushed_at":"2021-06-03T14:25:58.000Z","size":10569,"stargazers_count":27,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T14:34:45.153Z","etag":null,"topics":["consonants","nlp","nlp-stemming","porter-stemmer-algorithm","stemmer","vowel"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kampsy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-19T22:30:42.000Z","updated_at":"2025-02-17T15:47:16.000Z","dependencies_parsed_at":"2024-10-14T11:45:56.210Z","dependency_job_id":"b07255f8-75bc-4ccb-ad0b-eb225f096405","html_url":"https://github.com/kampsy/gwizo","commit_stats":null,"previous_names":["kampsy/gwizo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kampsy/gwizo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kampsy%2Fgwizo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kampsy%2Fgwizo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kampsy%2Fgwizo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kampsy%2Fgwizo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kampsy","download_url":"https://codeload.github.com/kampsy/gwizo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kampsy%2Fgwizo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270918279,"owners_count":24667664,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["consonants","nlp","nlp-stemming","porter-stemmer-algorithm","stemmer","vowel"],"created_at":"2024-12-17T20:13:15.242Z","updated_at":"2025-08-17T22:31:37.732Z","avatar_url":"https://github.com/kampsy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gwizo\n\n![home](https://github.com/kampsy/gwizo/blob/master/img/gwizo.png)\n\n[![Gwizo version](https://img.shields.io/badge/gwizo-2.0-green.svg)](https://github.com/kampsy/gwizo)\n[![GoDoc](https://godoc.org/github.com/kampsy/gwizo?status.svg)](https://godoc.org/github.com/kampsy/gwizo)\n[![License](https://img.shields.io/badge/license-BSD%20Style-blue.svg)](https://github.com/kampsy/gwizo/blob/master/LICENSE)\n[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/kampsy)\n\nPackage gwizo implements Porter Stemmer algorithm, M. \"An algorithm for suffix stripping.\"\nProgram 14.3 (1980): 130-137.\nMartin Porter, the algorithm's inventor, maintains a web page about the\nalgorithm at http://www.tartarus.org/~martin/PorterStemmer/\n\n## Installation\n\nTo install, simply run in a terminal:\n\n    go get github.com/kampsy/gwizo\n\n\n## Stem\n\nStem: stem the word.\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"github.com/kampsy/gwizo\"\n)\n\nfunc main() {\n  stem := gwizo.Stem(\"abilities\")\n  fmt.Printf(\"Stem: %s\\n\", stem)\n}\n```\n```shell\n$ go run main.go\n\nStem: able\n```\n\n## Vowels, Consonants and Measure\n\ngwizo returns a type Token which has two fileds, VowCon which is the vowel consonut pattern \nand the Measure value [v]vc{m}[c]\n```go\n  package main\n\n  import (\n    \"fmt\"\n    \"github.com/kampsy/gwizo\"\n    \"strings\"\n  )\n\nfunc main() {\n  word := \"abilities\"\n  token := gwizo.Parse(word)\n\n  // VowCon\n  fmt.Printf(\"%s has Pattern %s \\n\", word, token.VowCon)\n\n  // Measure value [v]vc{m}[c]\n  fmt.Printf(\"%s has Measure value %d \\n\", word, token.Measure)\n\n  // Number of Vowels\n  v := strings.Count(token.VowCon, \"v\")\n  fmt.Printf(\"%s Has %d Vowels \\n\", word, v)\n\n  // Number of Consonants\n  c := strings.Count(token.VowCon, \"c\")\n  fmt.Printf(\"%s Has %d Consonants\\n\", word, c)\n}\n```\n\n```bash\n$ go run main.go\n\nabilities has Pattern vcvcvcvvc\nabilities has Measure value 4\nabilities Has 5 Vowels\nabilities Has 4 Consonants\n```\n\n## File Stem Performance.\n\n```go\n  package main\n\n  import (\n    \"fmt\"\n    \"github.com/kampsy/gwizo\"\n    \"bufio\"\n    \"io/ioutil\"\n    \"strings\"\n    \"os\"\n    \"time\"\n  )\n\n  func main() {\n    curr := time.Now()\n    writeOut()\n    elaps := time.Since(curr)\n    fmt.Println(\"============================\")\n    fmt.Println(\"Done After:\", elaps)\n    fmt.Println(\"============================\")\n  }\n\n  func writeOut() {\n    re, err := ioutil.ReadFile(\"input.txt\")\n    if err != nil {\n      fmt.Println(err)\n    }\n\n    file := strings.NewReader(fmt.Sprintf(\"%s\", re))\n    scanner := bufio.NewScanner(file)\n    out, err := os.Create(\"stem.txt\")\n    if err != nil {\n      fmt.Println(err)\n    }\n    defer out.Close()\n    for scanner.Scan() {\n      txt := scanner.Text()\n      stem := gwizo.Stem(txt)\n      out.WriteString(fmt.Sprintf(\"%s\\n\", stem))\n      fmt.Println(txt, \"---\u003e\", str)\n    }\n    if err := scanner.Err(); err != nil {\n      fmt.Println(err)\n    }\n  }\n```\n```shell\n$ go run main.go\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkampsy%2Fgwizo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkampsy%2Fgwizo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkampsy%2Fgwizo/lists"}