Lexigram HTTP API Documentation

ExtractEntities_

extractEntities

The core of our data extraction API. Matches the input text against concepts in the Lexigraph to find and extract concept matches. Maintains pointers to the exact character offsets matched in the text. Identifies the types of the concept (drug, anatomy, problem, etc.), its context (negation, speculation, patient/family history, demographics), and a sectionId if it appears in a known section.


/extract/entities

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bawgle/extract/entities"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ExtractEntities_Api;

import java.io.File;
import java.util.*;

public class ExtractEntities_ApiExample {

    public static void main(String[] args) {
        
        ExtractEntities_Api apiInstance = new ExtractEntities_Api();
        String apiecoKey = apiecoKey_example; // String | 
        String string = ; // String | body
        try {
            inline_response_200 result = apiInstance.extractEntities(apiecoKey, string);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtractEntities_Api#extractEntities");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ExtractEntities_Api;

public class ExtractEntities_ApiExample {

    public static void main(String[] args) {
        ExtractEntities_Api apiInstance = new ExtractEntities_Api();
        String apiecoKey = apiecoKey_example; // String | 
        String string = ; // String | body
        try {
            inline_response_200 result = apiInstance.extractEntities(apiecoKey, string);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ExtractEntities_Api#extractEntities");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *string = ; // body

ExtractEntities_Api *apiInstance = [[ExtractEntities_Api alloc] init];

[apiInstance extractEntitiesWith:apiecoKey
    string:string
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LexigramHttpApiDocumentation = require('lexigram_http_api_documentation');

var api = new LexigramHttpApiDocumentation.ExtractEntities_Api()

var apiecoKey = apiecoKey_example; // {String} 

var string = ; // {String} body


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.extractEntities(apiecoKey, string, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class extractEntitiesExample
    {
        public void main()
        {
            
            var apiInstance = new ExtractEntities_Api();
            var apiecoKey = apiecoKey_example;  // String | 
            var string = new String(); // String | body

            try
            {
                inline_response_200 result = apiInstance.extractEntities(apiecoKey, string);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ExtractEntities_Api.extractEntities: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ExtractEntities_Api();
$apiecoKey = apiecoKey_example; // String | 
$string = ; // String | body

try {
    $result = $api_instance->extractEntities($apiecoKey, $string);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExtractEntities_Api->extractEntities: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ExtractEntities_Api;

my $api_instance = WWW::SwaggerClient::ExtractEntities_Api->new();
my $apiecoKey = apiecoKey_example; # String | 
my $string = WWW::SwaggerClient::Object::String->new(); # String | body

eval { 
    my $result = $api_instance->extractEntities(apiecoKey => $apiecoKey, string => $string);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ExtractEntities_Api->extractEntities: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ExtractEntities_Api()
apiecoKey = apiecoKey_example # String | 
string =  # String | body

try: 
    api_response = api_instance.extract_entities(apiecoKey, string)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExtractEntities_Api->extractEntities: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Body parameters
Name Description
string *

Responses

Status: 200 - successfull


Highlight

highlight

Returns HTML enriched versions of the input text surrounding found concepts in span tags to aid visualization of the data.


/staging/classifyn

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/bawgle/staging/classifyn"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.HighlightApi;

import java.io.File;
import java.util.*;

public class HighlightApiExample {

    public static void main(String[] args) {
        
        HighlightApi apiInstance = new HighlightApi();
        String apiecoKey = apiecoKey_example; // String | 
        String_1 string = ; // String_1 | body
        try {
            inline_response_200_1 result = apiInstance.highlight(apiecoKey, string);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HighlightApi#highlight");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.HighlightApi;

public class HighlightApiExample {

    public static void main(String[] args) {
        HighlightApi apiInstance = new HighlightApi();
        String apiecoKey = apiecoKey_example; // String | 
        String_1 string = ; // String_1 | body
        try {
            inline_response_200_1 result = apiInstance.highlight(apiecoKey, string);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HighlightApi#highlight");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String_1 *string = ; // body

HighlightApi *apiInstance = [[HighlightApi alloc] init];

[apiInstance highlightWith:apiecoKey
    string:string
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var LexigramHttpApiDocumentation = require('lexigram_http_api_documentation');

var api = new LexigramHttpApiDocumentation.HighlightApi()

var apiecoKey = apiecoKey_example; // {String} 

var string = ; // {String_1} body


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.highlight(apiecoKey, string, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class highlightExample
    {
        public void main()
        {
            
            var apiInstance = new HighlightApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var string = new String_1(); // String_1 | body

            try
            {
                inline_response_200_1 result = apiInstance.highlight(apiecoKey, string);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling HighlightApi.highlight: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\HighlightApi();
$apiecoKey = apiecoKey_example; // String | 
$string = ; // String_1 | body

try {
    $result = $api_instance->highlight($apiecoKey, $string);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HighlightApi->highlight: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::HighlightApi;

my $api_instance = WWW::SwaggerClient::HighlightApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $string = WWW::SwaggerClient::Object::String_1->new(); # String_1 | body

eval { 
    my $result = $api_instance->highlight(apiecoKey => $apiecoKey, string => $string);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HighlightApi->highlight: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.HighlightApi()
apiecoKey = apiecoKey_example # String | 
string =  # String_1 | body

try: 
    api_response = api_instance.highlight(apiecoKey, string)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HighlightApi->highlight: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Body parameters
Name Description
string *

Responses

Status: 200 - successfull