Compares a pair of strings or sequences based on whether they are identical or not.
BinaryComp(score = 1, similarity = FALSE, ignore_case = FALSE)A BinaryComp instance is returned, which is an S4 class inheriting from
StringComparator.
a numeric of length 1. Positive distance to return if the pair of strings/sequences are not identical. Defaults to 1.0.
a logical. If TRUE, similarities are returned instead of
distances. Specifically score is returned if the strings agree,
and 0.0 is returned otherwise.
a logical. If TRUE, case is ignored when comparing strings.
If similarity = FALSE (default) the scores can be interpreted
as distances. When \(x = y\) the comparator returns a distance of 0.0,
and when \(x \neq y\) the comparator returns score.
If similarity = TRUE the scores can be interpreted as similarities.
When \(x = y\) the comparator returns score, and when \(x \neq y\)
the comparator returns 0.0.