# Collation The vocabulary of comparing, sorting and searching text by the Unicode Collation Algorithm (UTS #10) and CLDR's tailorings of it. ## Ordering **Collation element**: One unit of weight a character or sequence of characters maps to, carrying a primary, secondary and tertiary weight (and, here, a fourth). _Avoid_: CE (in prose), weight tuple **Strength**: How many levels of weight a comparison looks at: primary (base letters), secondary (accents), tertiary (case and variants), quaternary, identical. _Avoid_: level (when the setting is meant), sensitivity **Tailoring**: A locale's changes to the root collation, such as Danish sorting `å` after `z` and treating `aa` as `å`. _Avoid_: locale rules, customization **Sort key**: A byte string whose binary order is the collation's order for the string it was built from. _Avoid_: collation key, match key ## Searching **Pattern**: The string being searched for. _Avoid_: query, needle **Target**: The string being searched in. _Avoid_: haystack, text, subject **Match**: A range of the target that the collation, at its strength, cannot tell apart from the pattern. _Avoid_: hit, occurrence **Minimal match**: A match that excludes any ignorable characters around it. _Avoid_: tight match **Maximal match**: A match that takes in the ignorable characters around it. _Avoid_: loose match **Match edge**: A point in the target where a match may begin or end: between collation elements, and with nothing the collation weighed as one on both sides of it. _Avoid_: cut, split point **Match boundary**: A constraint on where a match may start and end: nowhere in particular, or only between whole characters (grapheme clusters). _Avoid_: word boundary (unless whole words are meant) **Asymmetric search**: A search in which an unmarked pattern character matches the same character marked or unmarked in the target, but a marked pattern character matches only the same mark. _Avoid_: one-way search, accent-insensitive search **Marked**: Carrying more than the lowest weight at a level: an accent at the secondary level, uppercase or a compatibility variant at the tertiary. For kana the normal form is the unmarked one, and it is unmarked only among the forms of its own syllabary: hiragana is not an unmarked katakana. _Avoid_: decorated, modified **Fuzzy match**: A match that may differ from the pattern by up to a given number of edits. _Avoid_: approximate match, near match **Edit**: One character of the pattern left out, one of the target's put in, or one put in place of another. A character that weighs nothing at the strength searched at costs no edit to leave out or put in. _Avoid_: typo, error **Closeness**: How near a match is to its pattern: by the number of characters changed, then the number of accent differences, then the number of case and variant differences. _Avoid_: score, relevance **Match key**: A byte string built from a string's collation elements such that two strings with equal match keys match, and a pattern that matches inside a target has its match key inside the target's. _Avoid_: folded string, collation folding, sort key