{"id":19031475,"url":"https://github.com/plandes/clj-nlp-serv","last_synced_at":"2026-05-17T03:05:01.409Z","repository":{"id":80107495,"uuid":"75453050","full_name":"plandes/clj-nlp-serv","owner":"plandes","description":"RESTful Natural Language Parse Service","archived":false,"fork":false,"pushed_at":"2018-04-20T15:54:12.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-02T04:14:38.560Z","etag":null,"topics":["clojure","docker","natural-language-processing","nlp-parsing","rest-api","stanford-corenlp"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plandes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-12-03T05:09:12.000Z","updated_at":"2018-04-20T15:54:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2b2fd20-c1fb-4dc3-8de6-8b9b8adef6ad","html_url":"https://github.com/plandes/clj-nlp-serv","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plandes%2Fclj-nlp-serv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plandes%2Fclj-nlp-serv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plandes%2Fclj-nlp-serv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plandes%2Fclj-nlp-serv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plandes","download_url":"https://codeload.github.com/plandes/clj-nlp-serv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240080768,"owners_count":19744924,"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":["clojure","docker","natural-language-processing","nlp-parsing","rest-api","stanford-corenlp"],"created_at":"2024-11-08T21:23:46.588Z","updated_at":"2026-05-03T07:30:19.133Z","avatar_url":"https://github.com/plandes.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RESTful Natural Language Parse Service\n\nA RESTful service that service NLP parsing requests.  This makes\nthe [NLP parsing project](https://github.com/plandes/clj-nlp-parse) available\nas a [REST service](https://en.wikipedia.org/wiki/Representational_state_transfer).\n\n\u003c!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc --\u003e\n## Table of Contents\n\n- [Obtaining](#obtaining)\n- [Documentation](#documentation)\n- [Usage](#usage)\n    - [Usage Help](#usage-help)\n- [Docker](#docker)\n- [Building](#building)\n- [Changelog](#changelog)\n- [License](#license)\n\n\u003c!-- markdown-toc end --\u003e\n\n\n## Obtaining\n\nThis project is designed to be used as a stand along application *and* a\nlibrary so you can add and use your own pipeline components.  For the library,\nin your `project.clj` file, add:\n\n[![Clojars Project](https://clojars.org/com.zensols.nlp/serv/latest-version.svg)](https://clojars.org/com.zensols.nlp/serv/)\n\n\n## Documentation\n\nAdditional [documentation](https://plandes.github.io/clj-nlp-serv/codox/index.html).\n\n\n## Usage\n\nYou can use this as a command line program to generate a prettyprint parse tree\nof an utterance.  However, you have to let it know where the\nStanford CoreNLP libraries are configured (see the\n[NLP parse project setup docs](https://github.com/plandes/clj-nlp-parse#setup)\nfor more information.\n\nTo create the command line utility, do the following:\n\n- Install [Leiningen](http://leiningen.org) (this is just a script)\n- Install [GNU make](https://www.gnu.org/software/make/)\n- Install [Git](https://git-scm.com)\n- Download the source:\n```bash\n$ git clone https://github.com/clj-nlp-parse\n```\n- Follow the directions in [build section](#building)\n- Edit and uncomment the `makefile` to set the `ZMODEL` variable, which should\n  be set to a directory having the stanford POS model(s) in `standford/pos`.\n- Build the distribution binaries:\n```bash\n$ make dist\n```\nIf everything goes well and you are lucky a new folder should show up on your\ndesktop with everything you need to run it.  To do that:\n```bash\n$ cd ~/Desktop/parse/bin\n$ ./nlparse parse -u 'I am Paul Landes'\n```\n\nNow start the RESTful service, on say, port 9000 (defaults to 8080):\n```bash\n$ ./nlparse service -p 9000\n```\n\nUse a web client to test the service using the *pretty print* option:\n```bash\n$ wget -q -O - 'http://localhost:9000/parse?utterance=My+name+is+Paul+Landes\u0026pretty=true'\n```\n\nThe output:\n```json\n{\"text\":\"My name is Paul Landes\",\n \"mentions\":\n [{\"entity-type\":\"PERSON\",\n   \"token-range\":[3, 5],\n   \"ner-tag\":\"PERSON\",\n   \"sent-index\":0,\n   \"char-range\":[11, 22],\n   \"text\":\"Paul Landes\"}],\n \"tok-re-mentions\":[],\n \"coref\":\n [{\"id\":1,\n   \"mention\":\n   [{\"sent-index\":1,\n     \"token-range\":[4, 6],\n     \"head-index\":5,\n     \"gender\":\"MALE\",\n     \"animacy\":\"ANIMATE\",\n     \"type\":\"PROPER\",\n     \"number\":\"SINGULAR\"}]},\n```\n\n**Note:** I will make the distribution binaries available on request.\n\n\n### Usage Help\n\nFor convenience, here's the usage docs you get when invoking with no\nparameters:\n```sql\n$ nlparse\nrepl\tstart a repl either on the command line or headless with -h\n  -h, --headless            start an nREPL server\n  -p, --port NUMBER  12345  the port bind for the repl server\n\n parse\tparse an English utterance\n  -l, --level LOG LEVEL  INFO  Log level to set in the Log4J2 system.\n  -u, --utterance TEXT         The utterance to parse\n  -p, --pretty                 Pretty print the JSON string\n\n service\tstart the agent parse website and service\n  -p, --port PORT  8080  the port bind for web site/service\n\n version\tGet the version of the application.\n  -g, --gitref\n```\n\n\n## Docker\n\nA [docker image is available](https://hub.docker.com/r/plandes/nlpservice/)\nwith an install of this service at [Docker Hub](http://hub.docker.com).  Here's\nan example of how to use the image in a `docker-compose.yml`:\n```yaml\nnlpserv:\n  container_name: nlps\n  image: plandes/nlpservice\n  ports:\n    - \"9100:9100\"\n  environment:\n    COMPONENTS: tokenize,sentence,part-of-speech,morphology,stopword\n    PORT: 9100\n```\n\n\n## Building\n\nTo build from source, do the folling:\n\n- Install [Leiningen](http://leiningen.org) (this is just a script)\n- Install [GNU make](https://www.gnu.org/software/make/)\n- Install [Git](https://git-scm.com)\n- Download the source: `git clone https://github.com/clj-nlp-serv \u0026\u0026 cd clj-nlp-serv`\n- Download the make include files:\n```bash\nmkdir ../zenbuild \u0026\u0026 wget -O - https://api.github.com/repos/plandes/zenbuild/tarball | tar zxfv - -C ../zenbuild --strip-components 1\n```\n- Build the distribution binaries: `make dist`\n\nNote that you can also build a single jar file with all the dependencies with: `make uber`\n\n\n## Changelog\n\nAn extensive changelog is available [here](CHANGELOG.md).\n\n\n## License\n\nCopyright © 2016, 2017 Paul Landes\n\nApache License version 2.0\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplandes%2Fclj-nlp-serv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplandes%2Fclj-nlp-serv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplandes%2Fclj-nlp-serv/lists"}