Medical Case Reports Text Classifier

A text classifier trained on the ade_corpus_v2 dataset.

Use this public function to categorize your text data into DrugRelatedAdverseEffect vs. NoDrugRelatedAdverseEffect. Try it out below or Contact Us to get API access.

Not what you are looking for? Check out our other pretrained text classifiers or train your own custom text classifier.

Hero image

Try It

Sample Gallery

Filter By Label
No Results

Download the Dataset

You can access this dataset programmatically through the Nyckel API.

List samples

GET v1/functions/fogbrte7aw0enk4w/samples
Header
accessToken
A JWT issued to your application by the Nyckel identity provider
Query
batchSize
Optional
The number of samples to return.
Query
cursor
Optional
When reading subsequent pages of data, use cursor to indicate the Id of the last sample already read in order to receive the next set of results.
Query
externalId
Optional
When specified, only return the sample associated with this externalId.
curl -X GET \
  'https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/samples'
import requests

url = 'https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/samples'

result = requests.get(url)
print(result.text)
fetch('https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/samples', {
    method: 'GET'
})
.then(response => response.json())
.then(data => console.log(data));
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/samples');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
curl_close($ch);
echo $result;

Returns an array of Sample objects.

id The Id of the created sample.
data The input data for this sample. The value stored in this field depends on the input type specified at function creation. See data types for more information.
externalId The externalId provided at sample creation, if any.
[
  {
    "id": "sample_2n5a7za51n329v0l",
    "prediction": {
      "labelId": "label_2n5a7za51n329v0l",
      "confidence": 0.76
    },
    "annotation": {
      "labelId": "label_2n5a7za51n329v0l"
    },
    "data": "<sampleData>",
    "externalId": "MyId-123"
  }
]

List labels

GET v1/functions/fogbrte7aw0enk4w/labels
Header
accessToken
A JWT issued to your application by the Nyckel identity provider
Query
batchSize
Optional
The number of labels to return.
Query
cursor
Optional
When reading subsequent pages of data, use cursor to indicate the Id of the last label already read in order to receive the next set of results.
curl -X GET \
  'https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/labels'
import requests

url = 'https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/labels'

result = requests.get(url)
print(result.text)
fetch('https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/labels', {
    method: 'GET'
})
.then(response => response.json())
.then(data => console.log(data));
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/labels');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
curl_close($ch);
echo $result;

Returns an array of Label.

id The Id of the created label.
name The name of this label.
description The description of this label.
metadata A dictionary of key/value pairs you can use to store additional information about this label.
[
  {
    "id": "label_2n5a7za51n329v0l",
    "name": "Is a bird"
  }
]

Function Statistics

Total samples 20,896
Number of labels 2
Labels

Want to Use This Function?

Integrate this function into your product with one simple API call:

curl -X POST \
  -H 'Authorization: Bearer <accessToken>' \
  -F 'data=@<fileName>' \
  'https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/invoke'
import requests

url = 'https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/invoke'
headers = {
    'Authorization': 'Bearer ' + '<accessToken>',
}

with open('<fileName>', 'rb') as f:
    result = requests.post(url, headers=headers, files={'data': f})
print(result.text)
const form = new FormData();
form.append('data', File(<fileBytes>, '<fileName>'));

fetch('https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/invoke', {
    method: 'POST',
    headers: {
        'Authorization': 'Bearer ' + '<accessToken>',
    },
    body: form
})
.then(response => response.json())
.then(data => console.log(data));
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://www.nyckel.com/v1/functions/fogbrte7aw0enk4w/invoke');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);

$file = curl_file_create(realpath('<fileName>'));
$fields = array('data' => $file);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);

$headers = array();
$headers[] = 'Authorization: Bearer ' . '<accessToken>';
$headers[] = 'Content-Type: multipart/form-data';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
curl_close($ch);
echo $result;

Not What You're Looking For?

Check out our other pretrained text classifiers or train your own custom text classifier.