rics.mapping.types#
Types used for mapping.
Module Attributes
Hashable type on the left side of a directional relationship. |
|
Hashable type on the right side of a directional relationship. |
|
A left-to-right mapping. |
|
A right-to-left mapping. |
|
A type of item being mapped. |
|
A type of item being mapped. |
|
A tuple of candidates matched to a value. |
|
Type of context in which mapping is being performed. |
|
Signature for a user-defined override function. |
|
Signature for a likeness score function. |
|
Signature for an alias function for heuristic scoring. |
|
Signature for a filter function. |
|
Types that may be interpreted as a score function heuristic. |
Classes
TypeVar(name, *constraints[, bound, ...]) |
Type variable. |
- class HL#
Hashable type on the left side of a directional relationship.
alias of TypeVar(‘HL’, bound=
Hashable)
- class HR#
Hashable type on the right side of a directional relationship.
alias of TypeVar(‘HR’, bound=
Hashable)
- MatchTuple#
A tuple of candidates matched to a value.
alias of
Tuple[CandidateType, …]
- class ContextType#
Type of context in which mapping is being performed.
alias of TypeVar(‘ContextType’, bound=
Hashable)
- UserOverrideFunction#
Signature for a user-defined override function.
- Parameters:
value – An element to find matches for.
candidates – Potential matches for value.
context – The context in which scoring is being performed.
- Returns:
Either
None(let regular logic decide) or a single candidate c in candidates.
alias of
Callable[[ValueType,Set[CandidateType],Optional[ContextType]],Optional[CandidateType]]
- ScoreFunction#
Signature for a likeness score function.
- Parameters:
value – An element to find matches for.
candidates – Potential matches for value.
context – The context in which scoring is being performed.
- Keyword Arguments:
kwargs – Accepted only by some functions.
- Yields:
A score for each candidate c in candidates.
alias of
Callable[[ValueType,Iterable[CandidateType],Optional[ContextType]],Iterable[float]]
- AliasFunction#
Signature for an alias function for heuristic scoring.
- Parameters:
value – An element to find matches for.
candidates – Potential matches for value.
context – The context in which mapping is being performed.
- Keyword Arguments:
kwargs – Accepted only by some functions.
- Returns:
A tuple (name, candidates) with applied heuristics to increase (or decrease) score as desired.
alias of
Callable[[ValueType,Iterable[CandidateType],Optional[ContextType]],Tuple[ValueType,Iterable[CandidateType]]]
- FilterFunction#
Signature for a filter function.
- Parameters:
value – An element to find matches for.
candidates – Potential matches for value.
context – The context in which filtering is being performed.
- Keyword Arguments:
kwargs – Accepted only by some functions.
- Returns:
A subset of candidates to keep.
alias of
Callable[[ValueType,Iterable[CandidateType],Optional[ContextType]],Set[CandidateType]]
- HeuristicsTypes#
Types that may be interpreted as a score function heuristic.
alias of
Union[Callable[[ValueType,Iterable[CandidateType],Optional[ContextType]],Tuple[ValueType,Iterable[CandidateType]]],Callable[[ValueType,Iterable[CandidateType],Optional[ContextType]],Set[CandidateType]]]