Last Updated on

This API will classify multiple input HOCR XML files according to the batch class name provided. This API will require the following plugins “SEARCH_CLASSIFICATION_PLUGIN”, “DOCUMENT_ASSEMBLER_PLUGIN” and the learning must be done on the batch class. If any batch class doesn’t have these plugins than classify hocr will not work.

Request Method POST

Input Parameters

Input Parameter Values Descriptions
batchClassId This value should not be empty and it should be valid batch class identifier like BC1. This parameter is used for providing batch class identifier on which HOCR classification will be performed.


Web Service URL: http://{serverName}:{port}/dcma/rest/classifyMultiPageHocr


  • Input file should be zip file containing *_HOCR.xml.
  • batchClassId should be valid batch class identifier and must have the following plugins “SEARCH_CLASSIFICATION_PLUGIN” and “DOCUMENT_ASSEMBLER_PLUGIN”.

Sample client code using apache commons http client:-

private static void classifyMultiPageHocr() {
		HttpClient client = new HttpClient();
		String url = "http://localhost:8080/dcma/rest/classifyMultiPageHocr ";
		PostMethod mPost = new PostMethod(url);
		// Adding ZIP file for processing
		File file1 = new File("C:\\sample\\");
		Part[] parts = new Part[2];
		try {
			parts[0] = new FilePart(file1.getName(), file1);
			String batchIdentifier = "BC5";
			parts[1] = new StringPart("batchClassId", batchIdentifier);
			MultipartRequestEntity entity = new MultipartRequestEntity(parts, mPost.getParams());
			int statusCode = client.executeMethod(mPost);
			String responseBody = mPost.getResponseBodyAsString();
			System.out.println(statusCode + "***" + responseBody);
		} catch (FileNotFoundException e) {
		} catch (HttpException e) {
		} catch (IOException e) {

Changes Under 4100 Release

i.<Result> element is renamed to <Result_Message>
ii.<Category> element is added under <PageLevelField> tag which determines the grouping of Fields at Review/Validate screen
iii.<widgetType> element is added under <PageLevelField> tag which determines the type of UI widget
iv.<LearnedFileName> element is added to <AlternateValue> tag


Was this article helpful to you?