pub struct AlignmentConfig {
pub case_sensitive: bool,
pub algorithm: AlignmentAlgorithm,
pub annotation_id_prefix: Option<String>,
pub trim: bool,
pub simple_only: bool,
pub minimal_align_length: usize,
pub max_errors: Option<AbsoluteOrRelative>,
pub grow: bool,
pub verbose: bool,
pub quiet: bool,
}Fields§
§case_sensitive: boolCase-insensitive matching has more performance overhead
algorithm: AlignmentAlgorithm§annotation_id_prefix: Option<String>Prefix to use when assigning annotation IDs. The actual ID will have a random component
trim: boolStrip leading and trailing whitespace/newlines from aligned text selections, keeping them as minimal as possible (default is to be as greedy as possible in selecting) Setting this may lead to certain whitespaces not being covered even though they may align.
simple_only: boolOnly allow for alignments that consist of one contiguous text selection on either side. This is a so-called simple transposition.
minimal_align_length: usizeThe minimal number of characters that must be aligned (absolute number) for a transposition/translation to be valid
max_errors: Option<AbsoluteOrRelative>The maximum number of errors (max edit distance) that may occur for a transposition to be valid.
This is either an absolute integer or a relative ratio between 0.0 and 1.0, interpreted in relation to the length of the first text in the alignment.
In other words; this represents the number of characters in the search string that may be missed when matching in the larger text.
The transposition itself will only consist of fully matching parts, use grow if you want to include non-matching parts.
grow: boolGrow aligned parts into larger alignments by incorporating non-matching parts. This will return translations rather than transpositions.
You’ll want to set max_errors in combination with this one to prevent very low-quality alignments.
verbose: boolOutput alignments to standard output in a TSV format
quiet: boolLimit output
Trait Implementations§
Source§impl Clone for AlignmentConfig
impl Clone for AlignmentConfig
Source§fn clone(&self) -> AlignmentConfig
fn clone(&self) -> AlignmentConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AlignmentConfig
impl Debug for AlignmentConfig
Auto Trait Implementations§
impl Freeze for AlignmentConfig
impl RefUnwindSafe for AlignmentConfig
impl Send for AlignmentConfig
impl Sync for AlignmentConfig
impl Unpin for AlignmentConfig
impl UnwindSafe for AlignmentConfig
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> 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 more