{"id":15540239,"url":"https://github.com/rm-hull/clj-wordnet","last_synced_at":"2025-10-23T17:33:04.149Z","repository":{"id":8705539,"uuid":"10372129","full_name":"rm-hull/clj-wordnet","owner":"rm-hull","description":"An interface to the WordNet database using idiomatic Clojure","archived":false,"fork":false,"pushed_at":"2015-07-14T16:13:30.000Z","size":292,"stargazers_count":35,"open_issues_count":3,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-03T12:17:31.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/rm-hull.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-30T00:23:15.000Z","updated_at":"2021-09-06T13:00:44.000Z","dependencies_parsed_at":"2022-07-09T21:16:10.432Z","dependency_job_id":null,"html_url":"https://github.com/rm-hull/clj-wordnet","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/rm-hull%2Fclj-wordnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fclj-wordnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fclj-wordnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fclj-wordnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rm-hull","download_url":"https://codeload.github.com/rm-hull/clj-wordnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250472241,"owners_count":21436106,"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-10-02T12:13:19.956Z","updated_at":"2025-10-23T17:33:04.075Z","avatar_url":"https://github.com/rm-hull.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clj-WordNet [![Build Status](https://secure.travis-ci.org/delver/clj-wordnet.png)](http://travis-ci.org/delver/clj-wordnet)\n\nA thin/partial wrapper around some [JWI](http://projects.csail.mit.edu/jwi/) \nfunctionality, for interfacing the [WordNet](http://wordnet.princeton.edu/) \ndatabase using idiomatic Clojure.\n\n## Prerequisites\n\nYou will need [Leiningen](https://github.com/technomancy/leiningen) \n2.3.4 or above installed.\n\n## Building\n\nTo build and install the library locally, run:\n\n    $ git submodule update --init data\n    $ lein test\n    $ lein install\n\n## Including in your project\n\nThere is an initial version hosted at [Clojars](https://clojars.org/clj-wordnet/clj-wordnet).\nFor leiningen include a dependency:\n\n```clojure\n[clj-wordnet \"0.1.0\"]\n```\n    \nFor maven-based projects, add the following to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eclj-wordnet\u003c/groupId\u003e\n  \u003cartifactId\u003eclj-wordnet\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nA snapshot version is also available, use ```\"0.1.1-SNAPSHOT\"```.\n\n## WordNet Database\n\nThe WordNet database is not bundled in this project; it is _referenced_ \nvia a git submodule, in order to run integration tests. In order to\nensure the submodule is properly initialised, follow the build \ninstructions above.\n\n## Quick Examples\n\n```clojure\n(def wordnet (make-dictionary \"../path-to/wordnet/dict/\"))\n\n(def dog (first (wordnet \"dog\" :noun)))\n\n(:lemma dog)\n=\u003e \"dog\"\n\n(:pos dog)\n=\u003e :noun\n\n(:gloss dog)\n=\u003e \"a member of the genus Canis (probably descended from the common wolf) that\n    has been domesticated by man since prehistoric times; occurs in many breeds; \n    \\\"the dog barked all night\\\"\"   \n\n(map :lemma (words (:synset dog))\n=\u003e (\"dog\" \"domestic_dog\", \"Canis_familiaris\")\n\n(def frump (first (wordnet \"frump\" :noun)))\n\n(map :lemma (related-words frump :derivationally-related))\n=\u003e (\"frumpy\")\n\n(map :lemma (flatten (vals (related-synsets dog :hypernym))))\n=\u003e (\"domestic_animal\" \"domesticated_animal\" \"canine\" \"canid\")\n```\n\n## Dictionary\n\nThe default dictionary will load definitions from the database as needed\nand they will be cached as necessary. If higher performance is required\nand there is sufficient memory available to the JVM, then the dictionary \ncan be made to be resident entirely in memory, as below. This will force \nan immediate load of the dictionary into RAM, where there may be a \nperceptible delay on startup. \n\n```clojure\n(def wordnet (make-dictionary \"../path-to/wordnet/dict/\" :in-memory))\n```\n\nNote: Wordnet is quite large, and usually won’t fit into the standard heap on most\n32-bit JVMs. You need to increase your heap size. On the Sun JVM, this involves \nthe command line flag -Xmx along with a reasonable heap size, say, 500 MB or 1 GB.\n\n## Word Lookup\n\nWord definitions can be fetched using the ```make-dictionary``` factory as per the\nexample below:\n\n```clojure\n(def wordnet (make-dictionary \"../path-to/wordnet/dict/\"))\n\n(wordnet \"car#n#1\")    ; fetch the first noun definition for car\n\n(wordnet \"bus\")        ; fetch a list of all definitions for bus\n\n(wordnet \"row\" :noun)  ; fetch a list of all noun definitions for row\n\n(wordnet \"row#v#1\")    ; fetch the single verb definition for row\n\n(wordnet \"WID-02086723-N-01-dog\" ; fetch the word with the specified ID\n\n(wordnet \"SID-02086723-N\" ; fetch the synset with the specified ID\n```\n\n## See Also\n\nThe JWI has been mavenized and rolled up into a github repo, here: https://github.com/delver/jwi.\nThe resulting artifacts have been deployed to http://repo.delver.io/releases, and this has been \nreferenced in this project's repository resolution section.\n\n## TODO\n\n* ~~Implement ```(make-dictionary \"../path-to/wordnet/dict/\" :in-memory)``` to use\n  RAM-based dictionary~~\n* ~~Coerce functions into separate namespace~~\n* ~~Re-implement ```(related-synsets ...)``` and ```(related-words ...)```~~\n* ~~Push JWI 2.2.4 to central repository~~\n* ~~Unit tests \u0026 Travis CI~~\n* Implement more similarity algorithms\n* Improve performance\n\n## License\n\nSame as JWI: MIT / [Creative Commons 3.0](http://creativecommons.org/licenses/by/3.0/legalcode)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fclj-wordnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frm-hull%2Fclj-wordnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fclj-wordnet/lists"}