File name: custom-ai-renditions-definitions.json
Mount location and example:
./custom-ai-renditions-definitions.json:/usr/local/tomcat/shared/classes/alfresco/extension/transform/renditions/custom-ai-renditions-definitions.json
Content:
The following JSON snippet shows the configuration for three renditions for two custom entity recognizers and one custom classifier.
{
"renditions": [
{
"renditionName": "aiBusinessCustom",
"targetMediaType": "application/vnd.alfresco.ai.features.v1+json",
"options": [
{"name": "endpointAwsComprehendEntityRecognizer", "value": "arn:aws:comprehend:<region-name>:<account-id>:entity-recognizer/<recognizer-name>"},
{"name": "maxResults", "value": 1000},
{"name": "minConfidence", "value": 0.8}
]
},
{
"renditionName": "aiSportCustom",
"targetMediaType": "application/vnd.alfresco.ai.features.v1+json",
"options": [
{"name": "endpointAwsComprehendEntityRecognizer", "value": "arn:aws:comprehend:<region-name>:<account-id>:entity-recognizer/<recognizer-name>"},
{"name": "maxResults", "value": 1000},
{"name": "minConfidence", "value": 0.8}
]
},
{
"renditionName": "aiClassification",
"targetMediaType": "application/vnd.alfresco.ai.classifiers.v1+json",
"options": [
{"name": "endpointAwsComprehendClassifier", "value": "arn:aws:comprehend:<region-name>:<account-id>:document-classifier/<classifier-name>"},
{"name": "maxResults", "value": 1},
{"name": "minConfidence", "value": 0.2}
]
}
]
}
The rendition configuration for entity recognition and classification is slightly different:
renditionName- the key/label for the rendition. This must be unique, as it must match the rendition names in thecustomAIPropertyMapping.jsonfile. It's best to choose a name that's indicative of the recognizer/classifier used.targetMediaType- can be one of two options:application/vnd.alfresco.ai.features.v1+jsonfor entity recognizersapplication/vnd.alfresco.ai.classifiers.v1+jsonfor classifiers
maxResults- the maximum number of results (entities/categories) that should be used in Content Services. It makes sense to use a large value when searching for entities in a document, and a very small value when trying to identify a category for an entire documentminConfidence- the minimum confidence for a result (between 0 and 1). A lower value can be used when the maximum number of values is small (i.e. for classification).