{"id":18780375,"url":"https://github.com/karan/vocabulary","last_synced_at":"2025-04-13T11:30:49.861Z","repository":{"id":65984373,"uuid":"47361628","full_name":"karan/vocabulary","owner":"karan","description":"Golang package to get meanings, synonyms, antonyms and more for a word","archived":false,"fork":false,"pushed_at":"2015-12-07T20:10:14.000Z","size":14,"stargazers_count":61,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T23:29:51.143Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/karan.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":"2015-12-03T21:27:00.000Z","updated_at":"2024-09-18T14:37:34.000Z","dependencies_parsed_at":"2023-02-19T18:15:56.057Z","dependency_job_id":null,"html_url":"https://github.com/karan/vocabulary","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karan%2Fvocabulary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karan%2Fvocabulary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karan%2Fvocabulary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karan%2Fvocabulary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karan","download_url":"https://codeload.github.com/karan/vocabulary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248705503,"owners_count":21148549,"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":[],"created_at":"2024-11-07T20:26:11.498Z","updated_at":"2025-04-13T11:30:49.419Z","avatar_url":"https://github.com/karan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vocabulary\n\n[![](http://i.imgur.com/RJSJHlA.png)](https://xkcd.com/1443/)\n\nAn English-language dictionary and thesaurus in a Go package by [Karan Goel](https://twitter.com/karangoel).\n\n[![Build Status](https://drone.io/github.com/karan/vocabulary/status.png)](https://drone.io/github.com/karan/vocabulary/latest)\n\nGolang port of [the Python counterpart](https://github.com/prodicus/vocabulary/).\n\nFor a given word, `Vocabulary` will give you:\n\n* **Meaning**\n* **Synonyms**\n* **Antonyms**\n* **Part of speech**: whether the word is a noun, interjection or an adverb et el\n* **Usage example**: a quick example on how to use the word in a sentence\n\n## Features\n\n* Written in idiomatic Go\n* No external dependencies\n* So easy, a five-year-old can use it\n* Works on Mac, Linux and Windows.\n\n## Installation\n\n```bash\n$ go get -u github.com/karan/vocabulary\n```\n\n## Usage\n\n### Get API keys\n\n1. [Big Huge Thesaurus](http://words.bighugelabs.com/getkey.php)\n  * Required for `Antonyms`\n2. [Wordnik](http://developer.wordnik.com/)\n  * Required for `PartOfSpeech`\n\nCalling `vocabulary.Word()` with any word as a string will return a `vocabulary.Word` type object that has all possible information about it.\n\nOr if you just want selective information, you can call individual functions passing in a word (`vocabulary.Meanings(\"hallucination\")`).\n\n```go\npackage main\n\n// Simple example usage of\n//  github.com/karan/vocabulary\n\nimport (\n  \"fmt\"\n  \"log\"\n\n  \"github.com/karan/vocabulary\"\n)\n\nfunc main() {\n  // Set the API keys\n  // Some functions require API keys. Refer to docs.\n  // If API keys are not required, simple set empty strings as config:\n  c := \u0026vocabulary.Config{BigHugeLabsApiKey: BigHugeLabsApiKey, WordnikApiKey: WordnikApiKey}\n\n  // Instantiate a Vocabulary object with your config\n  v, err := vocabulary.New(c)\n  if err != nil {\n    log.Fatal(err)\n  }\n\n  // Create a new vocabulary.Word object, and collects all possible information.\n  word, err := v.Word(\"vuvuzela\")\n  if err != nil {\n    log.Fatal(err)\n  }\n\n  fmt.Printf(\"word.Word = %s \\n\", word.Word)\n  fmt.Printf(\"word.Meanings = %s \\n\", word.Meanings)\n  fmt.Printf(\"word.Synonyms = %s \\n\", word.Synonyms)\n  fmt.Printf(\"word.Antonyms = %s \\n\", word.Antonyms)\n  fmt.Printf(\"word.PartOfSpeech = %s \\n\", word.PartOfSpeech)\n  fmt.Printf(\"word.UsageExample = %s \\n\", word.UsageExample)\n\n  // Get just the synonyms\n  // synonyms, err := v.Synonyms(\"area\")\n  // if err != nil {\n  //   log.Fatal(err)\n  // }\n  // for _, s := range synonyms {\n  //   fmt.Println(s)\n  // }\n  //\n\n  // Get just the antonyms\n  // ants, err := v.Antonyms(\"love\")\n  // if err != nil {\n  //   log.Fatal(err)\n  // }\n  // for _, a := range ants {\n  //   fmt.Println(a)\n  // }\n\n  // Get just the part of speech\n  // pos, err := v.PartOfSpeech(\"love\")\n  // if err != nil {\n  //   log.Fatal(err)\n  // }\n  // for _, a := range pos {\n  //   fmt.Println(a)\n  // }\n\n  // Can also use:\n  //  v.UsageExample(word)\n\n}\n\n```\n\n## Tests\n\nCreate `examples/api_keys.go` with your API keys:\n\n```go\npackage main\n\nconst (\n  BigHugeLabsApiKey = \"xxxx\"\n  WordnikApiKey     = \"xxxx\"\n)\n\n```\n\nThen, to run the tests, use this command:\n\n```bash\n$ go test\nPASS\n```\n\n## Bugs\n\nPlease use the [issue tracker](https://github.com/karan/vocabulary/issues) to submit any bugs or feature requests.\n\n## License\n\nMIT License © [Karan Goel](https://twitter.com/karangoel)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaran%2Fvocabulary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaran%2Fvocabulary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaran%2Fvocabulary/lists"}