#[non_exhaustive]pub struct Builder { /* private fields */ }Expand description
A builder for EntityRecognizerInputDataConfig
Implementations
sourceimpl Builder
impl Builder
sourcepub fn data_format(self, input: EntityRecognizerDataFormat) -> Self
pub fn data_format(self, input: EntityRecognizerDataFormat) -> Self
The format of your training data:
-
COMPREHEND_CSV: A CSV file that supplements your training documents. The CSV file contains information about the custom entities that your trained model will detect. The required format of the file depends on whether you are providing annotations or an entity list.If you use this value, you must provide your CSV file by using either the
AnnotationsorEntityListparameters. You must provide your training documents by using theDocumentsparameter. -
AUGMENTED_MANIFEST: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its labels. Each label annotates a named entity in the training document.If you use this value, you must provide the
AugmentedManifestsparameter in your request.
If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.
sourcepub fn set_data_format(self, input: Option<EntityRecognizerDataFormat>) -> Self
pub fn set_data_format(self, input: Option<EntityRecognizerDataFormat>) -> Self
The format of your training data:
-
COMPREHEND_CSV: A CSV file that supplements your training documents. The CSV file contains information about the custom entities that your trained model will detect. The required format of the file depends on whether you are providing annotations or an entity list.If you use this value, you must provide your CSV file by using either the
AnnotationsorEntityListparameters. You must provide your training documents by using theDocumentsparameter. -
AUGMENTED_MANIFEST: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its labels. Each label annotates a named entity in the training document.If you use this value, you must provide the
AugmentedManifestsparameter in your request.
If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.
sourcepub fn entity_types(self, input: EntityTypesListItem) -> Self
pub fn entity_types(self, input: EntityTypesListItem) -> Self
Appends an item to entity_types.
To override the contents of this collection use set_entity_types.
The entity types in the labeled training data that Amazon Comprehend uses to train the custom entity recognizer. Any entity types that you don't specify are ignored.
A maximum of 25 entity types can be used at one time to train an entity recognizer. Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break), \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma).
sourcepub fn set_entity_types(self, input: Option<Vec<EntityTypesListItem>>) -> Self
pub fn set_entity_types(self, input: Option<Vec<EntityTypesListItem>>) -> Self
The entity types in the labeled training data that Amazon Comprehend uses to train the custom entity recognizer. Any entity types that you don't specify are ignored.
A maximum of 25 entity types can be used at one time to train an entity recognizer. Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break), \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma).
sourcepub fn documents(self, input: EntityRecognizerDocuments) -> Self
pub fn documents(self, input: EntityRecognizerDocuments) -> Self
The S3 location of the folder that contains the training documents for your custom entity recognizer.
This parameter is required if you set DataFormat to COMPREHEND_CSV.
sourcepub fn set_documents(self, input: Option<EntityRecognizerDocuments>) -> Self
pub fn set_documents(self, input: Option<EntityRecognizerDocuments>) -> Self
The S3 location of the folder that contains the training documents for your custom entity recognizer.
This parameter is required if you set DataFormat to COMPREHEND_CSV.
sourcepub fn annotations(self, input: EntityRecognizerAnnotations) -> Self
pub fn annotations(self, input: EntityRecognizerAnnotations) -> Self
The S3 location of the CSV file that annotates your training documents.
sourcepub fn set_annotations(self, input: Option<EntityRecognizerAnnotations>) -> Self
pub fn set_annotations(self, input: Option<EntityRecognizerAnnotations>) -> Self
The S3 location of the CSV file that annotates your training documents.
sourcepub fn entity_list(self, input: EntityRecognizerEntityList) -> Self
pub fn entity_list(self, input: EntityRecognizerEntityList) -> Self
The S3 location of the CSV file that has the entity list for your custom entity recognizer.
sourcepub fn set_entity_list(self, input: Option<EntityRecognizerEntityList>) -> Self
pub fn set_entity_list(self, input: Option<EntityRecognizerEntityList>) -> Self
The S3 location of the CSV file that has the entity list for your custom entity recognizer.
sourcepub fn augmented_manifests(self, input: AugmentedManifestsListItem) -> Self
pub fn augmented_manifests(self, input: AugmentedManifestsListItem) -> Self
Appends an item to augmented_manifests.
To override the contents of this collection use set_augmented_manifests.
A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.
This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.
sourcepub fn set_augmented_manifests(
self,
input: Option<Vec<AugmentedManifestsListItem>>
) -> Self
pub fn set_augmented_manifests(
self,
input: Option<Vec<AugmentedManifestsListItem>>
) -> Self
A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.
This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.
sourcepub fn build(self) -> EntityRecognizerInputDataConfig
pub fn build(self) -> EntityRecognizerInputDataConfig
Consumes the builder and constructs a EntityRecognizerInputDataConfig
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more