Skip to content

Latest commit

 

History

History
319 lines (247 loc) · 12.1 KB

File metadata and controls

319 lines (247 loc) · 12.1 KB

EvaluatingApi

All URIs are relative to http://localhost

Method HTTP request Description
getAnnotationStats POST /annotation-stats Get Annotation Stats
getConcatenatedTrainerExports POST /concat_trainer_exports Get Concatenated Trainer Exports
getInterAnnotatorAgreementScores POST /iaa-scores Get Inter Annotator Agreement Scores
getSanityCheckWithTrainerExport POST /sanity-check Get Sanity Check With Trainer Export

getAnnotationStats

getAnnotationStats(trainerExport, trackingId)

Get Annotation Stats

Get annotation stats of trainer export files

Example

// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.EvaluatingApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure OAuth2 access token for authorization: OAuth2PasswordBearer
    OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
    OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");

    // Configure API key authorization: APIKeyCookie
    ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
    APIKeyCookie.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyCookie.setApiKeyPrefix("Token");

    EvaluatingApi apiInstance = new EvaluatingApi(defaultClient);
    List<File> trainerExport = Arrays.asList(); // List<File> | One or more trainer export files to be uploaded
    String trackingId = "trackingId_example"; // String | The tracking ID of the requested task
    try {
      apiInstance.getAnnotationStats(trainerExport, trackingId);
    } catch (ApiException e) {
      System.err.println("Exception when calling EvaluatingApi#getAnnotationStats");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
trainerExport List<File> One or more trainer export files to be uploaded
trackingId String The tracking ID of the requested task [optional]

Return type

null (empty response body)

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

getConcatenatedTrainerExports

Object getConcatenatedTrainerExports(trainerExport, trackingId)

Get Concatenated Trainer Exports

Concatenate multiple trainer export files into a single file for download

Example

// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.EvaluatingApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure OAuth2 access token for authorization: OAuth2PasswordBearer
    OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
    OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");

    // Configure API key authorization: APIKeyCookie
    ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
    APIKeyCookie.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyCookie.setApiKeyPrefix("Token");

    EvaluatingApi apiInstance = new EvaluatingApi(defaultClient);
    List<File> trainerExport = Arrays.asList(); // List<File> | A list of trainer export files to be concatenated
    String trackingId = "trackingId_example"; // String | The tracking ID of the requested task
    try {
      Object result = apiInstance.getConcatenatedTrainerExports(trainerExport, trackingId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling EvaluatingApi#getConcatenatedTrainerExports");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
trainerExport List<File> A list of trainer export files to be concatenated
trackingId String The tracking ID of the requested task [optional]

Return type

Object

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

getInterAnnotatorAgreementScores

getInterAnnotatorAgreementScores(annotatorAProjectId, annotatorBProjectId, scope, trainerExport, trackingId)

Get Inter Annotator Agreement Scores

Calculate inter annotator agreement scores between two projects

Example

// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.EvaluatingApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure OAuth2 access token for authorization: OAuth2PasswordBearer
    OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
    OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");

    // Configure API key authorization: APIKeyCookie
    ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
    APIKeyCookie.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyCookie.setApiKeyPrefix("Token");

    EvaluatingApi apiInstance = new EvaluatingApi(defaultClient);
    Integer annotatorAProjectId = 56; // Integer | The project ID from one annotator
    Integer annotatorBProjectId = 56; // Integer | The project ID from another annotator
    String scope = "per_concept"; // String | The scope for which the score will be calculated, e.g., per_concept, per_document or per_span
    List<File> trainerExport = Arrays.asList(); // List<File> | A list of trainer export files to be uploaded
    String trackingId = "trackingId_example"; // String | The tracking ID of the requested task
    try {
      apiInstance.getInterAnnotatorAgreementScores(annotatorAProjectId, annotatorBProjectId, scope, trainerExport, trackingId);
    } catch (ApiException e) {
      System.err.println("Exception when calling EvaluatingApi#getInterAnnotatorAgreementScores");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
annotatorAProjectId Integer The project ID from one annotator
annotatorBProjectId Integer The project ID from another annotator
scope String The scope for which the score will be calculated, e.g., per_concept, per_document or per_span [enum: per_concept, per_document, per_span]
trainerExport List<File> A list of trainer export files to be uploaded
trackingId String The tracking ID of the requested task [optional]

Return type

null (empty response body)

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

getSanityCheckWithTrainerExport

getSanityCheckWithTrainerExport(trainerExport, trackingId)

Get Sanity Check With Trainer Export

Sanity check the model being served with a trainer export

Example

// Import classes:
import org.cms.client.ApiClient;
import org.cms.client.ApiException;
import org.cms.client.Configuration;
import org.cms.client.auth.*;
import org.cms.client.models.*;
import org.cms.client.api.EvaluatingApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    
    // Configure OAuth2 access token for authorization: OAuth2PasswordBearer
    OAuth OAuth2PasswordBearer = (OAuth) defaultClient.getAuthentication("OAuth2PasswordBearer");
    OAuth2PasswordBearer.setAccessToken("YOUR ACCESS TOKEN");

    // Configure API key authorization: APIKeyCookie
    ApiKeyAuth APIKeyCookie = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyCookie");
    APIKeyCookie.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyCookie.setApiKeyPrefix("Token");

    EvaluatingApi apiInstance = new EvaluatingApi(defaultClient);
    List<File> trainerExport = Arrays.asList(); // List<File> | One or more trainer export files to be uploaded
    String trackingId = "trackingId_example"; // String | The tracking ID of the requested task
    try {
      apiInstance.getSanityCheckWithTrainerExport(trainerExport, trackingId);
    } catch (ApiException e) {
      System.err.println("Exception when calling EvaluatingApi#getSanityCheckWithTrainerExport");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
trainerExport List<File> One or more trainer export files to be uploaded
trackingId String The tracking ID of the requested task [optional]

Return type

null (empty response body)

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -