{"id":26356528,"url":"https://github.com/ds4sd/deepsearch-nlp-annotator-api-example","last_synced_at":"2025-03-16T13:32:00.286Z","repository":{"id":38840517,"uuid":"333117485","full_name":"DS4SD/deepsearch-nlp-annotator-api-example","owner":"DS4SD","description":"Example NLP Annotator API used for integrating with the IBM DeepSearch CPS platform","archived":false,"fork":false,"pushed_at":"2022-09-08T11:22:44.000Z","size":2005,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-17T19:51:17.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/DS4SD.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":"2021-01-26T14:52:39.000Z","updated_at":"2024-07-17T19:51:17.465Z","dependencies_parsed_at":"2022-08-26T19:50:49.389Z","dependency_job_id":null,"html_url":"https://github.com/DS4SD/deepsearch-nlp-annotator-api-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2Fdeepsearch-nlp-annotator-api-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2Fdeepsearch-nlp-annotator-api-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2Fdeepsearch-nlp-annotator-api-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2Fdeepsearch-nlp-annotator-api-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DS4SD","download_url":"https://codeload.github.com/DS4SD/deepsearch-nlp-annotator-api-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243875059,"owners_count":20361937,"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":"2025-03-16T13:30:55.141Z","updated_at":"2025-03-16T13:32:00.271Z","avatar_url":"https://github.com/DS4SD.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepSearch NLP Annotator API Example\n\nThis repository contains a simple annotator fulfilling the interface required\nby CPS. It is meant to be cloned, and then adapted to specific models. \n\n## Example models\n\nIn terms of functionality, the current code implements several different\nmodels, ranging from very simple (dictionary look-ups) to more SOTA (spaCy-models).\n\nThese models are:\n\n- [SimpleTextGeographyAnnotator](./docs/models/SimpleTextGeography.md)\n- [ScispacyBiomedAnnotator](./docs/models/Scispacy.md)\n- [WatsonHealthAnnotator](./docs/models/WatsonHealthAnnotator.md)\n\n## Install\n\nTo install the dependencies, execute the following commands in the\n`deepsearch-nlp-annotator-api-example` folder \n\n```sh\npython3 -m venv venv\nsource ./venv/bin/activate\npip install -r requirements.txt\n```\n\n## Run API server\n\nTo launch the Rest-API server, execute the following command\n\n```sh\nsh launch_server.sh\n```\n\nThe application is exposing an interactive Swagger UI interface, which is\nreachable at http://localhost:5000/api/v1/ui/. By default the API requires\n`test 123` as authentication (see green `Authorize` button on right top corner).\n\n## Query API server\n\nA detailed description to query the Rest-API can be found [here](./docs/utils/query.md). We\nalso have an easy `interactive` query script, which allows you to read strings from a txt-file\nand visualise the output. For that, first launch the server (see above) and then go to the\n`tests` folder and execute,\n\n```sh\npython interactive_test.py\n```\n\nBy default, it will read line-by-line a [TXT file](./tests/data/geography). In case you want to run\nit on other TXT files, simply type\n\n```sh\npython interactive_test.py --filename \u003cpath-to-text-file\u003e\n```\n\nIn case you want to run on CCS document files, simply type\n\n```sh\npython interactive_test.py --documents \u003cdirectory-with-CCS-converted-doc's\u003e\n```\n\n## Further details\n\n- [Running the Annotator Application through Curl](./docs/utils/query.md)\n    - How to launch locally\n    - Example input and output\n- [Use the Annotator in CPS](./docs/utils/cps.md)\n    - How to configure the model in CPS\n- [Using an Ngrok Tunnel](./docs/utils/ngrok.md)\n    - Example of local development connected to CPS\n- [Deploying the application](./docs/utils/deploy.md)\n    - How to deploy for production usage\n- [Develop a new annotator](./docs/utils/model_development.md)\n    - How to add your own annotator\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds4sd%2Fdeepsearch-nlp-annotator-api-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fds4sd%2Fdeepsearch-nlp-annotator-api-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds4sd%2Fdeepsearch-nlp-annotator-api-example/lists"}