From 32655f133ae4d590bb4ae1b2836ec35a4799a4c2 Mon Sep 17 00:00:00 2001 From: Keigh Rim Date: Sat, 8 Jul 2023 14:04:39 -0400 Subject: [PATCH] updated README to refer to the common user manual --- README.md | 49 ++----------------------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 4de2120..79fd651 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,4 @@ -# CLAMS-spaCy wrapper +## User instruction -The spaCy NLP wrapped as a CLAMS service, spaCy is distributed under the [MIT license](https://github.com/explosion/spaCy/blob/master/LICENSE). - -This requires Python 3.8 or higher. For local install of required Python modules see [requirements.txt](requirements.txt). - -## Using this service - -Use `python app.py -t example-mmif.json out.json` just to test the wrapping code without using a server. To test this using a server you run the app as a service in one terminal: - -```bash -$ python app.py -``` - -And poke at it from another: - -```bash -$ curl http://0.0.0.0:5000/ -$ curl -H "Accept: application/json" -X POST -d@example-mmif.json http://0.0.0.0:5000/ -``` - -In CLAMS you usually run this in a container. To create an image - -```bash -$ docker build -f Containerfile -t clams-spacy-wrapper . -``` - -And to run it as a container: - -```bash -$ docker run --rm -d -p 5000:5000 clams-spacy-wrapper -$ curl -H "Accept: application/json" -X POST -d@example-mmif.json http://0.0.0.0:5000/ -``` - -The spaCy code will run on each text document in the input MMIF file. The file `example-mmif.json` has one text document in the top level `documents` property and two text documents in one of the views. The text documents all look as follows: - -```json -{ - "@type": "http://mmif.clams.ai/0.4.0/vocabulary/TextDocument", - "properties": { - "id": "m2", - "text": { - "@value": "Hello, this is Jim Lehrer with the NewsHour on PBS...." - } - } -} -``` -Instead of a `text:@value` property the text could in an external file, which would be given as a URI in the `location` property. See the readme file in [https://github.com/clamsproject/app-nlp-example](https://github.com/clamsproject/app-nlp-example) on how to do this. +General user instructions for CLAMS apps is available at [CLAMS Apps documentation](https://apps.clams.ai/clamsapp).