See: Description
Class | Description |
---|---|
Equivalence |
A line in the equivalence table: All tokens matching at least one of the
tokens in the same equivalence are considered equivalent.
|
Equivalences | |
EquivalencesTest | |
EToken |
A token as referenced in an
Equivalence . |
Position |
Abstract base class for the position of a token in a witness.
|
TokenIndex |
A
Position implementation that uses the index in the list of tokens
of a witness. |
Enum | Description |
---|---|
TokenType |
This model is subject to be enhanced!
This package contains a model for normalisations that will be created by the user and associated to a collation set. The normalization is used to compare tokens of the witnesses to collate, as described below.
Each normalization contains a list of equivalences. Each equivalence contains a list of tokens that are to be considered equal. Equivalences can be local or global, for local equivalences, the respective tokens' positions are taken in consideration.
The comparison algorithm's result is equivalent to the following:
Let w and v be tokens to be compared.
If w's normalized content equals v's normalized content, the tokens are considered equivalent. Otherwise, we extract the set of equivalences matching w, E(w) as follows: For each equivalence e in the whole equivalence set, we check whether the set of tokens of e contains at least one token t that is considered equal to w. If the equivalence e is global, t and w match if their respective normalized contents are equal. If e is local, additionally the positions of t and w must be equal.
A similar set of equivalences is calculated for v. If and only if the intersection of E(v) and E(w) is non-empty, w and v are considered equivalent.
EquivalenceSetTokenComparator
Copyright © 2013 TextGrid. All Rights Reserved.