Skip to main content

Use API Calls to Classify Documents Using Trained Classifiers

Abstract

Use API Calls to Classify Documents Using Trained Classifiers

This section provides a short guide on how to use the PoolParty API for classification of unknown documents.

When you have created Train Classifiers, added documents to them and tested them successfully, you will be ready to classify unknown documents in large numbers using our API.

The following has to be in place in order for you to be able to use the classifier:

  • A PoolParty Enterprise Server or Semantic Integrator license with Semantic Classifier add-on included.

  • An opened PoolParty thesaurus project you created.

How to Use the PoolParty Extractor API to Classify Documents
  1. Find the URI of the Train Classifier you want to use, by looking it up in PoolParty's interface or using the API method.

  2. Use the Concept Extraction Services and the classifier relevant parameters, details find in the Examples section.

  3. Create a script or code snippet to loop through such calls for classifying multiple documents.

Note

As also explained in more detail in our API documentation, you can easily use a software like Postman or any browser extension you find online to support you placing API calls.

In the Concept Extraction Service, the following parameters are available:

Path

Parameter

Comment

GET, POST /extract

documentClassifierIds

Enable document classification by giving the document classifier IDs as input.

Examples

The following example would classify a document according to the setup inside the respective classifiers and their categories. Terms or concepts have been excluded here:

 {{url}}extractor/api/extract?documentClassifierIds=documentClassifier:365f06b1-84d5-456d-aca8-185c67b0633a&language=en&projectId={{project}}&numberOfConcepts=0&numberOfTerms=0&file={mime-file-type}

This example uses more than one classifier in a row:

{{url}}extractor/api/extract?documentClassifierIds=documentClassifier:365f06b1-84d5-456d-aca8-185c67b0633a, documentClassifier:54eb65e3-c933-4a05-ae1e-f0e990a696a9&language=en&projectId={{project}}&numberOfConcepts=0&numberOfTerms=0&file={mime-file-type}