Skip to content

Commit

Permalink
re-add comparison libraries docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RossKen committed Apr 4, 2024
1 parent d898a0a commit c85ca71
Show file tree
Hide file tree
Showing 4 changed files with 452 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/comparison_level_composition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
tags:
- API
- comparisons
---
# Documentation for `comparison_level_composition` functions

`comparison_composition` allows the merging of existing comparison levels by a logical SQL clause - `OR`, `AND` or `NOT`.

This extends the functionality of our base comparison levels by allowing users to "join" existing comparisons by various SQL clauses.

For example, `or_(null_level("first_name"), null_level("surname"))` creates a check for nulls in *either* `first_name` or `surname`, rather than restricting the user to a single column.

The Splink comparison level composition functions available for each SQL dialect are as given in this table:

{% include-markdown "./includes/generated_files/comparison_composition_library_dialect_table.md" %}



The detailed API for each of these are outlined below.

## Library comparison composition APIs

::: splink.comparison_level_composition
handler: python
selection:
members:
- and_
- or_
- not_
193 changes: 193 additions & 0 deletions docs/comparison_level_library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
---
tags:
- API
- comparisons
- Damerau-Levenshtein
- Levenshtein
- Jaro-Winkler
- Jaccard
- Date Difference
- Distance In KM
- Array Intersect
- Columns Reversed
- Percentage Difference
toc_depth: 2
---
# Documentation for `comparison_level_library`

The `comparison_level_library` contains pre-made comparison levels available for use to
construct custom comparisons [as described in this topic guide](./topic_guides/comparisons/customising_comparisons.html#method-3-comparisonlevels).
However, not every comparison level is available for every [Splink-compatible SQL backend](./topic_guides/splink_fundamentals/backends/backends.md).

The pre-made Splink comparison levels available for each SQL dialect are as given in this table:

{% include-markdown "./includes/generated_files/comparison_level_library_dialect_table.md" %}



The detailed API for each of these are outlined below.

## Library comparison level APIs

::: splink.comparison_level_library.NullLevelBase
handler: python
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.ExactMatchLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.ElseLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.DistanceFunctionLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.LevenshteinLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.DamerauLevenshteinLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.JaroLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.JaroWinklerLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.JaccardLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.ColumnsReversedLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.DistanceInKMLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.PercentageDifferenceLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.ArrayIntersectLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_level_library.DatediffLevelBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3
147 changes: 147 additions & 0 deletions docs/comparison_library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
tags:
- API
- comparisons
- Levenshtein
- Jaro-Winkler
- Jaccard
- Distance In KM
- Date Difference
- Array Intersect
toc_depth: 2
---
# Documentation for `comparison_library`

The `comparison_library` contains pre-made comparisons available for use directly [as described in this topic guide](./topic_guides/comparisons/customising_comparisons.html#method-1-using-the-comparisonlibrary).
However, not every comparison is available for every [Splink-compatible SQL backend](./topic_guides/splink_fundamentals/backends/backends.html).

The pre-made Splink comparisons available for each SQL dialect are as given in this table:

{% include-markdown "./includes/generated_files/comparison_library_dialect_table.md" %}






The detailed API for each of these are outlined below.

## Library comparison APIs

::: splink.comparison_library.ExactMatchBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_library.DistanceFunctionAtThresholdsBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_library.LevenshteinAtThresholdsBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_library.DamerauLevenshteinAtThresholdsBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_library.JaccardAtThresholdsBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_library.JaroAtThresholdsBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_library.JaroWinklerAtThresholdsBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_library.ArrayIntersectAtSizesBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_library.DatediffAtThresholdsBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3

---

::: splink.comparison_library.DistanceInKMAtThresholdsBase
handler: python
selection:
members:
- __init__
rendering:
show_root_heading: true
show_source: false
heading_level: 3
Loading

0 comments on commit c85ca71

Please sign in to comment.