#[non_exhaustive]pub struct EntityRecognizerInputDataConfigBuilder { /* private fields */ }
Expand description
A builder for EntityRecognizerInputDataConfig
.
Implementations§
Source§impl EntityRecognizerInputDataConfigBuilder
impl EntityRecognizerInputDataConfigBuilder
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
Annotations
orEntityList
parameters. You must provide your training documents by using theDocuments
parameter. -
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
AugmentedManifests
parameter 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
Annotations
orEntityList
parameters. You must provide your training documents by using theDocuments
parameter. -
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
AugmentedManifests
parameter in your request.
If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV
as the default.
Sourcepub fn get_data_format(&self) -> &Option<EntityRecognizerDataFormat>
pub fn get_data_format(&self) -> &Option<EntityRecognizerDataFormat>
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
Annotations
orEntityList
parameters. You must provide your training documents by using theDocuments
parameter. -
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
AugmentedManifests
parameter 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 get_entity_types(&self) -> &Option<Vec<EntityTypesListItem>>
pub fn get_entity_types(&self) -> &Option<Vec<EntityTypesListItem>>
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 get_documents(&self) -> &Option<EntityRecognizerDocuments>
pub fn get_documents(&self) -> &Option<EntityRecognizerDocuments>
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 get_annotations(&self) -> &Option<EntityRecognizerAnnotations>
pub fn get_annotations(&self) -> &Option<EntityRecognizerAnnotations>
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 get_entity_list(&self) -> &Option<EntityRecognizerEntityList>
pub fn get_entity_list(&self) -> &Option<EntityRecognizerEntityList>
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 get_augmented_manifests(
&self,
) -> &Option<Vec<AugmentedManifestsListItem>>
pub fn get_augmented_manifests( &self, ) -> &Option<Vec<AugmentedManifestsListItem>>
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) -> Result<EntityRecognizerInputDataConfig, BuildError>
pub fn build(self) -> Result<EntityRecognizerInputDataConfig, BuildError>
Consumes the builder and constructs a EntityRecognizerInputDataConfig
.
This method will fail if any of the following fields are not set:
Trait Implementations§
Source§impl Clone for EntityRecognizerInputDataConfigBuilder
impl Clone for EntityRecognizerInputDataConfigBuilder
Source§fn clone(&self) -> EntityRecognizerInputDataConfigBuilder
fn clone(&self) -> EntityRecognizerInputDataConfigBuilder
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for EntityRecognizerInputDataConfigBuilder
impl Default for EntityRecognizerInputDataConfigBuilder
Source§fn default() -> EntityRecognizerInputDataConfigBuilder
fn default() -> EntityRecognizerInputDataConfigBuilder
Source§impl PartialEq for EntityRecognizerInputDataConfigBuilder
impl PartialEq for EntityRecognizerInputDataConfigBuilder
Source§fn eq(&self, other: &EntityRecognizerInputDataConfigBuilder) -> bool
fn eq(&self, other: &EntityRecognizerInputDataConfigBuilder) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for EntityRecognizerInputDataConfigBuilder
Auto Trait Implementations§
impl Freeze for EntityRecognizerInputDataConfigBuilder
impl RefUnwindSafe for EntityRecognizerInputDataConfigBuilder
impl Send for EntityRecognizerInputDataConfigBuilder
impl Sync for EntityRecognizerInputDataConfigBuilder
impl Unpin for EntityRecognizerInputDataConfigBuilder
impl UnwindSafe for EntityRecognizerInputDataConfigBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);