public class InformationExtractionTrainingSet extends ApplicationObject
Modifier and Type | Class and Description |
---|---|
static class |
InformationExtractionTrainingSet.MarkingTuple
MarkingTuple holds a tuple of position within a sentence and its label.
|
static class |
InformationExtractionTrainingSet.SentenceExtractor
SentenceExtractor extracts structured data from a Classifier TSV file.
|
static class |
InformationExtractionTrainingSet.SentenceTuple
SentenceTuple holds a tuple of sentence text and markings.
|
Modifier and Type | Field and Description |
---|---|
static String |
CLASS_NAME
The name of the ClassObject representing this class.
|
static String |
CLASSIFIERDOCUMENTS_ATTRIBUTE
The name of the attribute that holds
the set of Classifier Documents (from Confirmed Outcomes)
to be used as training input.
|
static String |
RELATIONDOCUMENTS_ATTRIBUTE
The name of the attribute that holds
the set of Relation Documents (from Confirmed Outcomes) in CONLL format
to be used as training input.
|
static String |
RESULTSLIST_DEFAULT_NAME
The default name to use for the inner results list.
|
static String |
SETTINGS_ATTRIBUTE
The name of the attribute that holds the training set settings.
|
static String |
TRAININGRESULTS_ATTRIBUTE
The name of the attribute that holds a summary of training results.
|
ACL_ATTRIBUTE, CREATEDATE_ATTRIBUTE, CREATOR_ATTRIBUTE, DELETOR_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, EXPIRATIONDATE_ATTRIBUTE, FAMILY_ATTRIBUTE, FLAG_CATEGORY_EXISTS, FLAG_CONFIGURATIONCATEGORY_EXISTS, FLAG_MARKED, FLAG_NOINFERIOR, FLAG_NOSELECT, FLAG_NTFS_ARCHIVE, FLAG_NTFS_HIDDEN, FLAG_NTFS_READONLY, FLAG_NTFS_SYSTEM, FLAG_UNMARKED, FLAGS_ATTRIBUTE, LASTMODIFIER_ATTRIBUTE, LASTMODIFYDATE_ATTRIBUTE, LOCKENTRIES_ATTRIBUTE, LOCKOBJECT_ATTRIBUTE, NAME_ATTRIBUTE, OWNER_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, POLICYLISTS_ATTRIBUTE, PRIMARYPARENTFOLDER_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE, RESOLVEDPUBLICOBJECT_ATTRIBUTE, SECURINGPUBLICOBJECT_ATTRIBUTE
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session
Constructor and Description |
---|
InformationExtractionTrainingSet(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Construct a InformationExtractionTrainingSet object.
|
Modifier and Type | Method and Description |
---|---|
void |
addClassifierDocument(Document val)
Adds the specified classifier document to this training set.
|
void |
addClassifierDocument(Document doc,
InformationExtraction ext)
Adds the specified classifier document to this training set,
on behalf of the optionally specified InformationExtraction.
|
protected void |
addClassifierResult(Document classfierDoc,
InformationExtraction ext)
Adds the specified classifier document as a result,
and perform other processing, if indicated.
|
void |
addRelationDocument(Document val)
Adds the specified relation document to this training set.
|
void |
addSetting(String key,
AttributeValue value)
Adds a setting (SimpleProperty) for this object.
|
SimplePropertyTable |
createExportSet(String exportSetName)
Creates a training ExportSet for the name specified.
|
Document |
createNerClassifierDocument(InformationExtractionParserSpecification pspec,
AttributeValueTable trainingProps,
String docName,
String docDesc,
AccessControlList docAcl,
Folder docFolder,
boolean addAsVersion)
Updates the NER Classifier model by creating a new NER Classifier Document.
|
Document |
createRelationMentionModelDocument(InformationExtractionParserSpecification pspec,
AttributeValueTable trainingProps,
String docName,
String docDesc,
AccessControlList docAcl,
Folder docFolder,
boolean addAsVersion)
Updates the RelationMention model by creating a new model Document.
|
Document |
createSpacyClassifierDocument(InformationExtractionParserSpecification pspec,
AttributeValueTable trainingProps,
String docName,
String docDesc,
AccessControlList docAcl,
Folder docFolder,
boolean addAsVersion)
Updates the Spacy Classifier model by creating a new Spacy Classifier Document.
|
protected Document |
createSpacyClassifierTrainingDocument(Document classfierDoc,
InformationExtraction ext)
Create a Spacy Classifier Document based on the specified classifier document.
|
protected String |
determineSpacyClassifierTrainingContent(Document classifierDoc)
Determine the contents to use for the Spacy Classifier Training document.
|
protected String |
determineSpacyClassifierTrainingDocumentName(Document classifierDoc)
Determine the Name to use for the Spacy Classifier Training document.
|
Document[] |
getClassifierDocuments()
Gets the Classifier Documents defined for this instance.
|
SimplePropertyTable |
getExportSet(String exportSetName)
Gets a training ExportSet for the name specified.
|
Document[] |
getRelationDocuments()
Gets the set of Relation Documents (from Confirmed Outcomes)
in CONLL format to be used as training input.
|
AttributeValue |
getSetting(String key)
Gets the setting on this object for the specified key.
|
SimpleProperty[] |
getSettings()
Gets the settings for this instance.
|
Document[] |
getSpacyClassifierDocuments()
Gets the Spacy Classifier Documents defined for this instance.
|
SimplePropertyTableList |
getTrainingResults()
Gets the summary of training results as a SimplePropertyTableList.
|
protected void |
postCreate(LibraryObjectDefinition lodef)
Extensibility point to perform actions after the
creation of a PublicObject.
|
protected void |
preCreate(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the
creation of a PublicObject.
|
protected void |
preFree(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the
permanent deletion ("free") of a object.
|
protected void |
preUpdate(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the update of
a PublicObject.
|
void |
removeClassifierDocument(Document val)
Removes the specified classifier document from this training set.
|
void |
removeExportSet(String exportSetName,
boolean freeExportSet)
Removes a training ExportSet for the name specified.
|
void |
removeRelationDocument(Document val)
Removes the specified relation document from this training set.
|
void |
setClassifierDocument(Document val)
Sets the specified classifier document to this training set,
replacing any previous training data.
|
void |
setClassifierDocument(Document doc,
InformationExtraction ext)
Sets the specified classifier document to this training set,
replacing any previous training data,
on behalf of the optionally specified InformationExtraction.
|
void |
setRelationDocument(Document val)
Sets the specified relation document to this training set,
replacing any previous training data.
|
void |
writeClassifierTrainingInputFile(String path)
Writes the Classifier Training input file that will contain the set of
all confirmed outcomes held by this instance.
|
void |
writeClassifierTrainingInputFile(String path,
AttributeValueTable options)
Writes the Classifier Training input file that will contain the set of
all confirmed outcomes held by this instance.
|
void |
writeRelationTrainingInputFile(String path)
Writes the CONLL Relation Training input file that will contain the set of
all confirmed outcomes held by this instance.
|
void |
writeRelationTrainingInputFile(String path,
AttributeValueTable options)
Writes the CONLL Relation Training input file that will contain the set of
all confirmed outcomes held by this instance.
|
void |
writeSpacyClassifierTrainingInputFile(String path)
Writes the Spacy Classifier Training input file that will contain the set of
all confirmed outcomes held by this instance.
|
void |
writeSpacyClassifierTrainingInputFile(String path,
AttributeValueTable options)
Writes the Spacy Classifier Training input file that will contain the set of
all confirmed outcomes held by this instance.
|
auditPublicObjectLocked, auditPublicObjectUnlocked, auditUpdated, constructApplicationObject, constructApplicationObjectVector, isValidEventType, reportApplicationObjectCreated, reportApplicationObjectFreed
addAccess, addAttachment, addCategory, addFlags, addMessageList, addRelationship, canAcquireManualLock, canReleaseDavLock, canReleaseLock, canReleaseManualLock, capabilities, checkAuditViewCapability, checkCapabilities, checkCapability, checkEffectiveAccess, checkEffectiveAccess, checkLockAccess, checkParentFolderCapability, checkVersioned, clearFlags, constructPublicObject, constructPublicObjectArray, constructPublicObjectVector, containsLockEntry, copy, coreAutoFolderingEnabled, createCategories, createDedicatedPolicyPropertyBundle, delete, deriveEffectiveAccessLevel, findAttachmentRelation, findOrAddActivityRecord, findOrAddActivityRecord, findOrAddActor, findOrAddActor, findOrAddMessageList, findOrAddMessageList, free, getAcl, getActivityRecord, getActor, getAllFolderPaths, getAllFolderPaths, getAllFolderPaths, getAnyFolderPath, getAnyFolderPath, getAnyFolderPath, getAttachmentRelation, getAttachmentRelations, getAttachments, getCapabilities, getCategories, getCategories, getCategories, getCategories, getCategories, getCategory, getConsumedStorage, getCreateDate, getCreator, getDefaultAccessLevel, getDefinitionForSimplePropertyUpdates, getDeletor, getDescription, getEffectiveAccessLevel, getEffectiveAccessLevel, getExpirationDate, getFamily, getFirstCategory, getFirstVersion, getFlags, getFolderReferences, getFolderReferences, getFolderReferencesSortSpecification, getLastModifier, getLastModifyDate, getLastVersion, getLeftwardRelationshipObjects, getLeftwardRelationshipObjects, getLeftwardRelationships, getLeftwardRelationships, getLeftwardRelationshipsCount, getLeftwardRelationshipsCount, getLinks, getLockEntries, getLockEntries, getLockObject, getLockRestrictions, getLockTypeAuditProperties, getMessageList, getNextVersion, getOwner, getPolicyBundle, getPolicyLists, getPreviousVersion, getPrimaryFolderPath, getPrimaryParentFolder, getPrimaryParentFolder, getRelations, getReservationComment, getReservationDate, getReservor, getResolvedPublicObject, getRestrictingLockEntries, getRightwardRelationshipObjects, getRightwardRelationshipObjects, getRightwardRelationships, getRightwardRelationships, getSecuringPublicObject, getSingletonVersionDescription, getVersionNumber, getVersions, getVersionSeries, getWorkingCopy, grantAccess, handleCopy, handleCreate, handleUnlockAll, hasActivityRecord, hasActor, hasAttachmentRelation, hasCategories, hasCategory, hasConfigurationCategories, hasMessageList, hasNameAttribute, hasPropertyBundleAttribute, isAttachment, isDeleted, isLatestVersion, isLocked, isLockingSupported, isOwner, isReserved, isReservedByCurrentUser, isVersionable, isVersioned, isWorkingCopy, listLeftwardRelationships, listRightwardRelationships, lock, lock, lock, lock, newVersion, postCopy, postSecurityChangedEvent, postUpdate, preCopy, putPolicy, reassociateLinks, removeAllPolicies, removeAttachment, removePolicy, removePolicy, removeRelationship, reserveNext, resetFolderReferences, resolveFolderReferenceSortSpecification, revokeAccess, revokeAllAccess, setAcl, setDescription, setExpirationDate, setFlags, setFolderReferencesSortSpecification, setLockEntries, setLockEntrySecurity, setOwner, setOwnerByName, setPolicyBundle, setPolicyLists, setSecuringPublicObject, toPublicObjectArray, undelete, unlock, unlock, unlockAll, unReserve, updateFlags, updateLock, vectorPublicObjectElement, vectorToPublicObjectArray, verifyAddRelationshipCapability, verifyCapabilities, verifyCapability, verifyDeleteCapability, verifyLockCapability, verifyRemoveRelationshipCapability, verifyUnlockCapability, verifyVersionSeries
added, addSimpleProperty, addSimpleProperty, applyProperties, auditCreated, canPurge, checkIfPropertyBundleSupported, checkRequiredAttributeSet, clearCopyContext, clearFreeContext, clearUpdateContext, compareTo, constructIdArray, constructIdArray, constructLibraryObject, constructLibraryObjectVector, createDedicatedPropertyBundle, createInstance, deriveDomainUniqueName, dispose, equals, equals, free, freeAll, get, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getAuditDomainContext, getAuditEventFolderContext, getClassId, getClassname, getClassName, getClassObject, getCommonName, getCommonNameAndClass, getCopyContext, getCreateContext, getData, getDefinition, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getFreeContext, getId, getLabel, getName, getObjectReferenceAttribute, getOperationActionSpecificationContext, getPropertyBundle, getPropertyValue, getPublicObjectAttribute, getResourceString, getResourceString, getSchemaObjectAttribute, getSession, getSessionInterface, getSharedStateFactory, getSimpleObjectAttribute, getSimpleProperties, getSimpleProperty, getSimplePropertyValue, getStringIdentifier, getSystemObjectAttribute, getTraceLogger, getUpdateContext, handleAdminModeChange, handleEvent, handleFree, handleUpdate, hashCode, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, lockRows, lookupInstanceLabel, performPostCreateExtensions, performPostFreeExtensions, performPostUpdateExtensions, performPreCreateExtensions, performPreFreeExtensions, performPreUpdateExtensions, postEvent, postEvent, postFree, prePostAuditEvent, putProperty, putProperty, removeAllProperties, removeAllSimpleProperties, removeAllSimpleProperties, removed, removeProperty, removeSimpleProperty, removeSimpleProperty, renderAsRandomAccessContent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setCopyContext, setFreeContext, setId, setName, setPropertyBundle, setPropertyValue, setUpdateContext, toString, trace, trustHandleCreate, trustHandleCreateAsAdmin, trustHandleFree, trustHandleFreeAsAdmin, trustHandleUpdate, trustHandleUpdateAsAdmin, update, updateAndExposeDefinition, validatePropertyValues, vectorLibraryObjectElement, vectorToLibraryObjectArray, verifyAdministrationMode, verifyConnected, verifyPersistent, verifySystemUserAccess, verifyTargetObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributeByUpperCaseName, getClassId, getId, getSessionInterface
getTraceLogger, isTraced, trace
public static final String CLASS_NAME
public static final String CLASSIFIERDOCUMENTS_ATTRIBUTE
public static final String RELATIONDOCUMENTS_ATTRIBUTE
public static final String SETTINGS_ATTRIBUTE
public static final String TRAININGRESULTS_ATTRIBUTE
public static final String RESULTSLIST_DEFAULT_NAME
public InformationExtractionTrainingSet(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- current LibrarySessionid
- object idclassId
- class iddata
- data componentIfsException
- if the operation failspublic Document[] getClassifierDocuments() throws IfsException
IfsException
- if the operation failspublic Document[] getSpacyClassifierDocuments() throws IfsException
IfsException
- if the operation failspublic Document[] getRelationDocuments() throws IfsException
IfsException
- if the operation failspublic SimpleProperty[] getSettings() throws IfsException
IfsException
- if the operation failspublic AttributeValue getSetting(String key) throws IfsException
key
- the keyIfsException
- if the operation failspublic SimplePropertyTableList getTrainingResults() throws IfsException
IfsException
- if the operation failspublic void addSetting(String key, AttributeValue value) throws IfsException
key
- the property's keyvalue
- the property's valueIfsException
- if the operation failspublic void addClassifierDocument(Document val) throws IfsException
val
- the new classifier documentIfsException
- if the operation failspublic void addClassifierDocument(Document doc, InformationExtraction ext) throws IfsException
doc
- the new classifier documentext
- the associated InformationExtractionIfsException
- if the operation failspublic void setClassifierDocument(Document val) throws IfsException
val
- the new classifier documentIfsException
- if the operation failspublic void setClassifierDocument(Document doc, InformationExtraction ext) throws IfsException
doc
- the new classifier documentext
- the associated InformationExtractionIfsException
- if the operation failsprotected void addClassifierResult(Document classfierDoc, InformationExtraction ext) throws IfsException
classfierDoc
- the new classifier documentext
- the associated InformationExtractionIfsException
- if the operation failsprotected Document createSpacyClassifierTrainingDocument(Document classfierDoc, InformationExtraction ext) throws IfsException
classfierDoc
- the regular classifier Documentext
- the target InformationExtractionIfsException
- if the operation failsprotected String determineSpacyClassifierTrainingContent(Document classifierDoc) throws IfsException
classfierDoc
- the regular classifier DocumentIfsException
- if the operation failsprotected String determineSpacyClassifierTrainingDocumentName(Document classifierDoc) throws IfsException
classfierDoc
- the regular classifier DocumentIfsException
- if the operation failspublic void removeClassifierDocument(Document val) throws IfsException
val
- the classifier document to removeIfsException
- if the operation failspublic void addRelationDocument(Document val) throws IfsException
val
- the new relation documentIfsException
- if the operation failspublic void setRelationDocument(Document val) throws IfsException
val
- the new relation documentIfsException
- if the operation failspublic void removeRelationDocument(Document val) throws IfsException
val
- the relation document to removeIfsException
- if the operation failspublic Document createNerClassifierDocument(InformationExtractionParserSpecification pspec, AttributeValueTable trainingProps, String docName, String docDesc, AccessControlList docAcl, Folder docFolder, boolean addAsVersion) throws IfsException
pspec
- the ParserSpecification to apply updated modeltrainingProps
- the training property overridesdocName
- the name to use for the new training documentdocDesc
- the description to use for the new training documentdocAcl
- the ACL to use for the new training documentdocFolder
- the Parent folder for the new training documentaddAsVersion
- whether to add the new training Document as a versionIfsException
- if the operation failspublic void writeClassifierTrainingInputFile(String path) throws IfsException
path
- the File path to write the classifier training inputIfsException
- if the operation failspublic void writeClassifierTrainingInputFile(String path, AttributeValueTable options) throws IfsException
path
- the File path to write the classifier training inputoptions
- the options that control the set of documents exportedIfsException
- if the operation failspublic Document createSpacyClassifierDocument(InformationExtractionParserSpecification pspec, AttributeValueTable trainingProps, String docName, String docDesc, AccessControlList docAcl, Folder docFolder, boolean addAsVersion) throws IfsException
pspec
- the ParserSpecification to apply updated modeltrainingProps
- the Spacy training property overridesdocName
- the name to use for the new training documentdocDesc
- the description to use for the new training documentdocAcl
- the ACL to use for the new training documentdocFolder
- the Parent folder for the new training documentaddAsVersion
- whether to add the new training Document as a versionIfsException
- if the operation failspublic void writeSpacyClassifierTrainingInputFile(String path) throws IfsException
path
- the File path to write the Spacy classifier training inputIfsException
- if the operation failspublic void writeSpacyClassifierTrainingInputFile(String path, AttributeValueTable options) throws IfsException
path
- the File path to write the Spacy classifier training inputoptions
- the options that control the set of documents exportedIfsException
- if the operation failspublic Document createRelationMentionModelDocument(InformationExtractionParserSpecification pspec, AttributeValueTable trainingProps, String docName, String docDesc, AccessControlList docAcl, Folder docFolder, boolean addAsVersion) throws IfsException
pspec
- the ParserSpecification to apply updated modeltrainingProps
- the training property overridesdocName
- the name to use for the new training documentdocDesc
- the description to use for the new training documentdocAcl
- the ACL to use for the new training documentdocFolder
- the Parent folder for the new training documentaddAsVersion
- whether to add the new training Document as a versionIfsException
- if the operation failspublic void writeRelationTrainingInputFile(String path) throws IfsException
path
- the File path to write the relation training inputIfsException
- if the operation failspublic void writeRelationTrainingInputFile(String path, AttributeValueTable options) throws IfsException
path
- the File path to write the relation training inputoptions
- the options that control the set of documents exportedIfsException
- if the operation failspublic SimplePropertyTable createExportSet(String exportSetName) throws IfsException
If an existing ExportSet exists with that name, the existing ExportSet will be returned.
exportSetName
- the export set nameIfsException
- if the operation failspublic SimplePropertyTable getExportSet(String exportSetName) throws IfsException
If an existing ExportSet does not exist with that name, null is returned.
exportSetName
- the export set nameIfsException
- if the operation failspublic void removeExportSet(String exportSetName, boolean freeExportSet) throws IfsException
If an existing ExportSet does not exist with that name, no exception is thrown.
exportSetName
- the export set namefreeExportSet
- whether to free the SimplePropertyTable object
that was removedIfsException
- if the operation failsprotected void preCreate(LibraryObjectDefinition lodef) throws IfsException
PublicObject
Set an option that indicates that Categories are NOT to be created from within S_PublicObject.
preCreate
in class PublicObject
lodef
- object definition that will be used to create
the objectIfsException
- if the operation failsprotected void postCreate(LibraryObjectDefinition lodef) throws IfsException
PublicObject
This assumes that a transaction context has already been established.
postCreate
in class ApplicationObject
lodef
- object definition that was used to create the objectIfsException
- if the operation failsprotected void preUpdate(LibraryObjectDefinition lodef) throws IfsException
PublicObject
Set an option that indicates that Categories are NOT to be created from within S_PublicObject.
preUpdate
in class PublicObject
lodef
- object definition used to define how the target object
will be updatedIfsException
- if operation fails.protected void preFree(LibraryObjectDefinition lodef) throws IfsException
PublicObject
Override to free all existing categories, in such a way that the PO doesn't get updated for each category free.
preFree
in class ApplicationObject
lodef
- object definition used to hold
options related to the free operationIfsException
- if operation fails.Copyright © 2023. All rights reserved.