You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spaCy NLP tool wrapped as a CLAMS service, spaCy is distributed under the [MIT license](https://github.com/explosion/spaCy/blob/master/LICENSE).
3
+
## Description
4
+
The spaCy NLP wrapped as a CLAMS service, spaCy is distributed under the [MIT license](https://github.com/explosion/spaCy/blob/master/LICENSE).
4
5
5
-
This requires Python 3.8 or higher. For local install of required Python modules see [requirements.txt](requirements.txt).
6
-
7
-
## Using this service
8
-
9
-
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:
6
+
## User instruction
10
7
11
-
```bash
12
-
$ python app.py
13
-
```
8
+
General user instructions for CLAMS apps is available at [CLAMS Apps documentation](https://apps.clams.ai/clamsapp).
14
9
15
-
And poke at it from another:
10
+
### System requirements
16
11
17
-
```bash
18
-
$ curl http://0.0.0.0:5000/
19
-
$ curl -H "Accept: application/json" -X POST [email protected] http://0.0.0.0:5000/
20
-
```
21
-
22
-
In CLAMS you usually run this in a container. To create an image
This requires Python 3.8 or higher. For local install of required Python modules see [requirements.txt](requirements.txt).
27
13
28
-
And to run it as a container:
14
+
#### Using as local python programe
29
15
30
-
```bash
31
-
$ docker run --rm -d -p 5000:5000 clams-spacy-wrapper
32
-
$ curl -H "Accept: application/json" -X POST [email protected] http://0.0.0.0:5000/
33
-
```
16
+
Use `python app.py -t example-mmif.json out.json` just to test the wrapping code without using a server.
34
17
35
-
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:
"@value": "Hello, this is Jim Lehrer with the NewsHour on PBS...."
44
-
}
45
-
}
46
-
}
47
-
```
48
-
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.
20
+
For the full list of parameters, please refer to the app metadata from [CLAMS App Directory](https://apps.clams.ai/clamsapp/) or [`metadata.py`](metadata.py) file in this repository.
0 commit comments