ccp.docs/source/developermanual/ccp_methods/Gate Cloud Offensive Langua...

155 lines
5.0 KiB
JSON

{
"title": "Gate Cloud Offensive Language Classifier",
"description": "Classifies short texts such as Tweets based on whether they contain offensive language - for full details see https://cloud.gate.ac.uk/shopfront/displayItem/offensive-classifier",
"version": "1.0.0",
"jobControlOptions": "async-execute",
"metadata": [
{
"title": "Marco Lettere",
"role": "author",
"href": "https://accounts.dev.d4science.org/auth/admin/realms/d4science/users/88c76e47-5881-4716-a2bf-02d3b4073574"
},
{
"role": "category",
"title": "Gate Cloud"
}
],
"inputs": {
"ccpimage": {
"id": "ccpimage",
"title": "Runtime",
"description": "The image of the runtime to use for method execution. This depends on the infrastructure specific protocol for interacting with registries.",
"minOccurs": 1,
"maxOccurs": 1,
"schema": {
"type": "string",
"format": "url",
"contentMediaType": "text/plain",
"default": "bash",
"readOnly": true
}
},
"service": {
"id": "service",
"title": "Service name",
"description": "The name of the Gate Cloud service",
"minOccurs": 1,
"maxOccurs": 1,
"schema": {
"type": "string",
"format": null,
"contentMediaType": "text/plain",
"default": "offensive-classifier"
}
},
"baseurl": {
"id": "baseurl",
"title": "Base URL",
"description": "The base URL of the Gate Cloud REST API",
"minOccurs": 1,
"maxOccurs": 1,
"schema": {
"type": "string",
"format": "url",
"contentMediaType": "text/plain",
"default": "https://cloud-api.gate.ac.uk/process/",
"readOnly": true
}
},
"file": {
"id": "file",
"title": "Input file",
"description": "The input file to be annotated",
"minOccurs": 1,
"maxOccurs": 1,
"schema": {
"type": "string",
"format": "file",
"contentMediaType": "text/plain",
"default": ""
}
},
"contenttype": {
"id": "contenttype",
"title": "Content type",
"description": "The content type of the input file",
"minOccurs": 1,
"maxOccurs": 1,
"schema": {
"type": "string",
"format": null,
"contentMediaType": "text/plain",
"default": "text/plain",
"enum": [
"text/plain",
"application/pdf",
"text/html"
]
}
},
"credentials": {
"id": "credentials",
"title": "Credentials",
"description": "The Basic auth credentials",
"minOccurs": 1,
"maxOccurs": 1,
"schema": {
"type": "string",
"format": "secret",
"contentMediaType": "text/plain",
"default": "Z2M4YmEyZDQyaWxiOjNsdWF6dXFhcnE2NW5wZWlwamwy"
}
},
"annotations": {
"id": "annotations",
"title": "Annotations",
"description": "The requested annotations",
"minOccurs": 1,
"maxOccurs": 1,
"schema": {
"type": "string",
"format": "checklist",
"contentMediaType": "text/plain",
"default": ":OffensiveLanguage",
"enum": [
":OffensiveLanguage"
]
}
}
},
"outputs": {},
"additionalParameters": {
"parameters": [
{
"name": "deploy-script",
"value": [
"echo {{file}} | base64 -d > /ccp_data/input"
]
},
{
"name": "execute-script",
"value": [
"wget {{baseurl}}/{{service}}?annotations={{annotations}} --post-file /ccp_data/input --header \"Authorization: Basic {{credentials}}\" --header \"Content-Type: {{contenttype}}\" --header \"Accept: application/json\" -O /ccp_data/annotated.json"
]
},
{
"name": "undeploy-script",
"value": []
}
]
},
"links": [
{
"rel": "compatibleWith",
"title": "D4Science development Infrastructure",
"href": "infrastructures/d4science-dev-swarm"
}
],
"keywords": [
"gatecloud",
"hate",
"abuse"
],
"id": "9f9ee885-4502-400d-bc1a-87951da66ac1"
}