public class TrainingService extends Object
The TrainingService extracts the text contained in a document attached to a snapshot workitem. The file content is created by a OCR scan.
If a valuable training data set can be build for a document, than the XMLTraingData object is send to the Imixs-ML service to train a ml-model.
| Modifier and Type | Field and Description |
|---|---|
protected javax.enterprise.event.Event<EntityObjectEvent> |
entityObjectEvents |
static String |
FILE_ATTRIBUTE_TEXT |
static String |
ITEM_ML_DEFINITIONS |
static String |
ITEM_ML_ITEMS |
| Constructor and Description |
|---|
TrainingService() |
| Modifier and Type | Method and Description |
|---|---|
List<org.imixs.workflow.ItemCollection> |
getMLDefinitions(org.imixs.workflow.ItemCollection workitem)
This method returns a list of ItemCollection object holding the
ml.definitions stored in a given workitem.
|
void |
printXML(XMLTrainingData trainingData)
Log the training data into the server log
|
void |
testWorkitemData(org.imixs.workflow.ItemCollection config,
org.imixs.workflow.ItemCollection doc,
org.imixs.melman.WorkflowClient workflowClient)
This method is used to test an existing model.
|
MLTrainingResult |
trainWorkitemData(org.imixs.workflow.ItemCollection config,
org.imixs.workflow.ItemCollection workitem,
org.imixs.melman.WorkflowClient workflowClient)
This method is used to extract the text contained in a snapshot document and
search for 'known' entities within the text.
|
public static final String FILE_ATTRIBUTE_TEXT
public static final String ITEM_ML_ITEMS
public static final String ITEM_ML_DEFINITIONS
@Inject protected javax.enterprise.event.Event<EntityObjectEvent> entityObjectEvents
public MLTrainingResult trainWorkitemData(org.imixs.workflow.ItemCollection config, org.imixs.workflow.ItemCollection workitem, org.imixs.melman.WorkflowClient workflowClient)
The method generates statistical data.
config - - a config object providing the training configurationworkitem - - a workitem providing the dataworkflowClient - - a rest client instancepublic void testWorkitemData(org.imixs.workflow.ItemCollection config,
org.imixs.workflow.ItemCollection doc,
org.imixs.melman.WorkflowClient workflowClient)
doc - - a workitem providing the attachments and the entity
dataitems - - String list with itemsworkflowClient - - a rest client instancepublic void printXML(XMLTrainingData trainingData)
trainingData - public List<org.imixs.workflow.ItemCollection> getMLDefinitions(org.imixs.workflow.ItemCollection workitem)
Copyright © 2020–2021 Imixs Software Solutions GmbH. All rights reserved.