{"id":15620688,"url":"https://github.com/akb89/valencer","last_synced_at":"2025-04-28T13:41:18.749Z","repository":{"id":73382494,"uuid":"70737008","full_name":"akb89/valencer","owner":"akb89","description":"A REST API to query valence patterns in FrameNet","archived":false,"fork":false,"pushed_at":"2018-08-21T21:32:06.000Z","size":475240,"stargazers_count":8,"open_issues_count":8,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T10:11:12.386Z","etag":null,"topics":["coling2016","framenet","koa2","mongodb","rest-api","search-engine","valence-pattern"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/akb89.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":"2016-10-12T20:05:44.000Z","updated_at":"2024-01-16T14:26:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e49df48-34f6-44a6-987e-2cf3a9fbcbbd","html_url":"https://github.com/akb89/valencer","commit_stats":{"total_commits":393,"total_committers":5,"mean_commits":78.6,"dds":0.4732824427480916,"last_synced_commit":"1afe85a2b622b4ca96953e1b612092358ceb21b1"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akb89%2Fvalencer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akb89%2Fvalencer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akb89%2Fvalencer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akb89%2Fvalencer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akb89","download_url":"https://codeload.github.com/akb89/valencer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251321233,"owners_count":21570700,"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":["coling2016","framenet","koa2","mongodb","rest-api","search-engine","valence-pattern"],"created_at":"2024-10-03T09:02:03.234Z","updated_at":"2025-04-28T13:41:18.736Z","avatar_url":"https://github.com/akb89.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Valencer\n[![GitHub release][release-image]][release-url]\n[![Build][travis-image]][travis-url]\n[![Dependencies][david-image]][david-url]\n[![DevDependencies][david-dev-dep-image]][david-dev-url]\n[![Code Coverage][coverage-image]][coverage-url]\n[![FrameNet][framenet-image]][framenet-url]\n[![MIT License][license-image]][license-url]\n\nWelcome to **Valencer**, a RESTful API to query combinations of syntactic realizations of the arguments of a predicate \u0026ndash; aka *valence patterns* \u0026ndash; in the FrameNet database.\n\n#### Are you using us in your work? Please cite us!\n```latex\n@InProceedings{kabbach-ribeyre:2016:COLINGDEMO,\n  author    = {Kabbach, Alexandre  and  Ribeyre, Corentin},\n  title     = {{Valencer: an API to Query Valence Patterns in FrameNet}},\n  booktitle = {{Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: System Demonstrations}},\n  month     = dec,\n  year      = {2016},\n  address   = {Osaka, Japan},\n  publisher = {The COLING 2016 Organizing Committee},\n  pages     = {156--160},\n  url       = {http://aclweb.org/anthology/C16-2033}\n}\n```\n\n## Documentation\nThe full documentation of the API is available on our [GitHub Page](https://akb89.github.io/valencer/)\n\n## Background\nFor additional details regarding the background of the API, its architecture and use cases, refer to our [COLING 2016 paper](https://www.aclweb.org/anthology/C/C16/C16-2033.pdf)\n\n## Requirements\n- [Mongo](https://docs.mongodb.com/manual/administration/install-community/) \u003e= v3.4\n- [Node](https://nodejs.org/en/download/) \u003e= v7.6\n\nTo import FrameNet data to a Mongo database, check out\n[NoFrameNet](https://github.com/akb89/noframenet)\n\nAlternatively, we provide two MongoDB dumps for\n[FrameNet 1.5](data/fn_en_150.7z) and\n[FrameNet 1.7](data/fn_en_170.7z) data.\nIf you are running MongoDB on localhost and port 27017,\nyou can easily import the dumps once unzipped via:\n```\nmongorestore -d fn_en_170 /path/to/fn_en_170/\n```\nMore information is available via the MongoDB\n[documentation](https://docs.mongodb.com/manual/tutorial/backup-and-restore-tools/)\n\nIf you are using our dumps, please do not forget to file in a [FrameNet Data Request](https://framenet.icsi.berkeley.edu/fndrupal/framenet_request_data).\n\n\n## HowTo \u0026ndash; Start the Valencer server\n\n### Install the required dependencies\nRun the following command in your terminal, under the Valencer directory:\n```\nnpm install\n```\n\n### Set-up the configuration\nModify the `config/production.js` file according to your desired settings:\n```\nconst config = {\n  logger: logger.info,\n  api: {\n    port: 3030,\n  },\n  databases: {\n    server: 'localhost',\n    port: 27017,\n    names: {\n      en: {\n        150: 'fn_en_150',\n        160: 'fn_en_160',\n        170: 'fn_en_170',\n      },\n      ja: {\n        100: 'fn_ja_100',\n      },\n    },\n  },\n};\n```\n\n### Start the server\nTo start a single instance of the Valencer, run the following command in your\nterminal, under the Valencer directory:\n```\nnpm run start\n```\nFor better performances, you can also start multiple instances of the Valencer.\nTo do so, pass on the `-i` argument to npm:\n```\nnpm run start -- -i num_instances\n```\nTo create the maximum number of instances depending on available threads, do:\n```\nnpm run start -- -i 0\n```\n\n### Stop the server\nTo stop the server, run:\n```\nnpm run stop\n```\nNote that it will stop ALL instances of the Valencer\n\n### Monitoring\nTo monitor the Valencer API once started, run:\n```\npm2 monit valencer\n```\nIf pm2 is not installed globally in your environment, you can also do:\n```\n./node_modules/.bin/pm2 monit valencer\n```\n\nTo access the Valencer logs, run:\n```\npm2 logs valencer\n```\n\n## HowTo \u0026ndash; Shoot your first query\nHere is a sample HTTP request querying the first 10 AnnotationSets in the\ndatabase referring to the valence pattern `Donor.NP.Ext Theme.NP.Obj`:\n```\ncurl -i \"http://localhost:3030/v5/en/170/annoSets?vp=Donor.NP.Ext+Theme.NP.Obj\"\n```\nThe above query should output:\n```\nHTTP/1.1 200 OK\nVary: Origin, Accept-Encoding\nTotal-Count: 190\nSkip: 0\nLimit: 10\nContent-Type: application/json; charset=utf-8\nContent-Length: 4069\nDate: Wed, 24 Jan 2018 09:27:14 GMT\nConnection: keep-alive\n\n[{\"labels\":[\"5a62f8d9e3bf318cbac8aef0\",\"5a62f8d9e3bf318cbac8aef1\",\"5a62f8d9e3bf318cbac8aef2\",\"5a62f8d9e3bf318cbac8aef3\",\"5a62f8d9e3bf318cbac8aef4\",\"5a62f8d9e3bf318cbac8aef5\",\"5a62f8d9e3bf318cbac8aef6\",\"5a62f8d9e3bf318cbac8aef7\",\"5a62f8d9e3bf318cbac8aef8\",\"5a62f8d9e3bf318cbac8aef9\",\"5a62f8d9e3bf318cbac8aefa\"],\"_id\":2614616,\"lexUnit\":11593,\"sentence\":1569707,\"pattern\":\"5a62f8d9e3bf318cbac8aefc\"},{\"labels\":[\"5a62fb28e3bf318cba2ca68f\",\"5a62fb28e3bf318cba2ca690\",\"5a62fb28e3bf318cba2ca691\",\"5a62fb28e3bf318cba2ca692\",\"5a62fb28e3bf318cba2ca693\",\"5a62fb28e3bf318cba2ca694\",\"5a62fb28e3bf318cba2ca695\",\"5a62fb28e3bf318cba2ca696\",\"5a62fb28e3bf318cba2ca697\",\"5a62fb28e3bf318cba2ca698\"],\"_id\":6525725,\"lexUnit\":11593,\"sentence\":4096745,\"pattern\":\"5a62f8d9e3bf318cbac8aefc\"},{\"labels\":[\"5a62fb22e3bf318cba2b987f\",\"5a62fb22e3bf318cba2b9880\",\"5a62fb22e3bf318cba2b9881\",\"5a62fb22e3bf318cba2b9882\",\"5a62fb22e3bf318cba2b9883\",\"5a62fb22e3bf318cba2b9884\",\"5a62fb22e3bf318cba2b9885\",\"5a62fb22e3bf318cba2b9886\",\"5a62fb22e3bf318cba2b9887\",\"5a62fb22e3bf318cba2b9888\"],\"_id\":6527126,\"lexUnit\":11593,\"sentence\":4097344,\"pattern\":\"5a62f8d9e3bf318cbac8aefc\"},{\"labels\":[\"5a62fb25e3bf318cba2c3666\",\"5a62fb25e3bf318cba2c3667\",\"5a62fb25e3bf318cba2c3668\",\"5a62fb25e3bf318cba2c3669\",\"5a62fb25e3bf318cba2c366a\",\"5a62fb25e3bf318cba2c366b\",\"5a62fb25e3bf318cba2c366c\",\"5a62fb25e3bf318cba2c366d\",\"5a62fb25e3bf318cba2c366e\",\"5a62fb25e3bf318cba2c366f\"],\"_id\":6540825,\"lexUnit\":11593,\"sentence\":4100815,\"pattern\":\"5a62f8d9e3bf318cbac8aefc\"},{\"labels\":[\"5a62fb02e3bf318cba27b2ed\",\"5a62fb02e3bf318cba27b2ee\",\"5a62fb02e3bf318cba27b2ef\",\"5a62fb02e3bf318cba27b2f0\",\"5a62fb02e3bf318cba27b2f1\",\"5a62fb02e3bf318cba27b2f2\",\"5a62fb02e3bf318cba27b2f3\",\"5a62fb02e3bf318cba27b2f4\",\"5a62fb02e3bf318cba27b2f5\",\"5a62fb02e3bf318cba27b2f6\",\"5a62fb02e3bf318cba27b2f7\"],\"_id\":6542617,\"lexUnit\":11593,\"sentence\":4101222,\"pattern\":\"5a62f8d9e3bf318cbac8aefc\"},{\"labels\":[\"5a62f8d9e3bf318cbac8aff1\",\"5a62f8d9e3bf318cbac8aff2\",\"5a62f8d9e3bf318cbac8aff3\",\"5a62f8d9e3bf318cbac8aff4\",\"5a62f8d9e3bf318cbac8aff5\",\"5a62f8d9e3bf318cbac8aff6\",\"5a62f8d9e3bf318cbac8aff7\",\"5a62f8d9e3bf318cbac8aff8\",\"5a62f8d9e3bf318cbac8aff9\",\"5a62f8d9e3bf318cbac8affa\",\"5a62f8d9e3bf318cbac8affb\",\"5a62f8d9e3bf318cbac8affc\",\"5a62f8d9e3bf318cbac8affd\",\"5a62f8d9e3bf318cbac8affe\"],\"_id\":2615829,\"lexUnit\":11593,\"sentence\":1569663,\"pattern\":\"5a62f8d9e3bf318cbac8b000\"},{\"labels\":[\"5a62f8d9e3bf318cbac8b019\",\"5a62f8d9e3bf318cbac8b01a\",\"5a62f8d9e3bf318cbac8b01b\",\"5a62f8d9e3bf318cbac8b01c\",\"5a62f8d9e3bf318cbac8b01d\",\"5a62f8d9e3bf318cbac8b01e\",\"5a62f8d9e3bf318cbac8b01f\",\"5a62f8d9e3bf318cbac8b020\",\"5a62f8d9e3bf318cbac8b021\"],\"_id\":2615833,\"lexUnit\":11593,\"sentence\":1569671,\"pattern\":\"5a62f8d9e3bf318cbac8b022\"},{\"labels\":[\"5a62fb2ae3bf318cba2cfde5\",\"5a62fb2ae3bf318cba2cfde6\",\"5a62fb2ae3bf318cba2cfde7\",\"5a62fb2ae3bf318cba2cfde8\",\"5a62fb2ae3bf318cba2cfde9\",\"5a62fb2ae3bf318cba2cfdea\",\"5a62fb2ae3bf318cba2cfdeb\",\"5a62fb2ae3bf318cba2cfdec\",\"5a62fb2ae3bf318cba2cfded\",\"5a62fb2ae3bf318cba2cfdee\",\"5a62fb2ae3bf318cba2cfdef\",\"5a62fb2ae3bf318cba2cfdf0\",\"5a62fb2ae3bf318cba2cfdf1\"],\"_id\":6522246,\"lexUnit\":11593,\"sentence\":4096543,\"pattern\":\"5a62f8d9e3bf318cbac8b0ff\"},{\"labels\":[\"5a62fb25e3bf318cba2c3bf3\",\"5a62fb25e3bf318cba2c3bf4\",\"5a62fb25e3bf318cba2c3bf5\",\"5a62fb25e3bf318cba2c3bf6\",\"5a62fb25e3bf318cba2c3bf7\",\"5a62fb25e3bf318cba2c3bf8\",\"5a62fb25e3bf318cba2c3bf9\",\"5a62fb25e3bf318cba2c3bfa\",\"5a62fb25e3bf318cba2c3bfb\",\"5a62fb25e3bf318cba2c3bfc\",\"5a62fb25e3bf318cba2c3bfd\",\"5a62fb25e3bf318cba2c3bfe\",\"5a62fb25e3bf318cba2c3bff\"],\"_id\":6540732,\"lexUnit\":11593,\"sentence\":4100829,\"pattern\":\"5a62f8d9e3bf318cbac8b0ff\"},{\"labels\":[\"5a62f8e9e3bf318cbaccc46f\",\"5a62f8e9e3bf318cbaccc470\",\"5a62f8e9e3bf318cbaccc471\",\"5a62f8e9e3bf318cbaccc472\",\"5a62f8e9e3bf318cbaccc473\",\"5a62f8e9e3bf318cbaccc474\",\"5a62f8e9e3bf318cbaccc475\",\"5a62f8e9e3bf318cbaccc476\",\"5a62f8e9e3bf318cbaccc477\",\"5a62f8e9e3bf318cbaccc478\",\"5a62f8e9e3bf318cbaccc479\",\"5a62f8e9e3bf318cbaccc47a\",\"5a62f8e9e3bf318cbaccc47b\"],\"_id\":2447117,\"lexUnit\":12046,\"sentence\":1500476,\"pattern\":\"5a62f8e9e3bf318cbaccc480\"}]\n```\n\n[release-image]:https://img.shields.io/github/release/akb89/valencer.svg?style=flat-square\n[release-url]:https://github.com/akb89/valencer/releases/latest\n[travis-image]:https://img.shields.io/travis/akb89/valencer.svg?style=flat-square\n[travis-url]:https://travis-ci.org/akb89/valencer\n[coverage-image]:https://img.shields.io/coveralls/akb89/valencer/master.svg?style=flat-square\n[coverage-url]:https://coveralls.io/github/akb89/valencer?branch=master\n[quality-image]:https://img.shields.io/codeclimate/maintainability/Nickersoft/dql.svg?style=flat-square\n[quality-url]:https://codeclimate.com/github/akb89/valencer/maintainability\n[framenet-image]:https://img.shields.io/badge/framenet-1.5%E2%87%A1-blue.svg?style=flat-square\n[framenet-url]:https://framenet.icsi.berkeley.edu/fndrupal\n[license-image]:http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square\n[license-url]:LICENSE.txt\n[david-url]: https://david-dm.org/akb89/valencer\n[david-image]: https://david-dm.org/akb89/valencer.svg?style=flat-square\n[david-dev-dep-image]: https://img.shields.io/david/dev/akb89/valencer.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/akb89/valencer?type=dev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakb89%2Fvalencer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakb89%2Fvalencer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakb89%2Fvalencer/lists"}