# 2025 Barcamp Session Proposal: New Customized Clustering Feature since 3.9

**URL:** <https://forum.openrefine.org/t/2025-barcamp-session-proposal-new-customized-clustering-feature-since-3-9/2537>\
**Category:** Events\
**Tags:** barcamp-2025\
**Created:** [September 8, 2025, 3:26pm UTC](https://forum.openrefine.org/t/2025-barcamp-session-proposal-new-customized-clustering-feature-since-3-9/2537 "2025-09-08T15:26:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![b2m](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.openrefine.org/b2m/32/139_2.png) [@b2m](https://forum.openrefine.org/u/b2m)\
**Post date:** [September 8, 2025, 3:26pm UTC](https://forum.openrefine.org/t/2025-barcamp-session-proposal-new-customized-clustering-feature-since-3-9/2537/1 "2025-09-08T15:26:41Z")

</div>

**Description**

Since [OpenRefine 3.9](https://github.com/OpenRefine/OpenRefine/releases/tag/3.9.0) we have a new feature that enables us to [define our own clustering functions](https://github.com/OpenRefine/OpenRefine/issues/4301).

Since the release there is not a lot talk about this feature. Also no user questions in the forum. Actually the feature was broken from the first release and nobody noticed for quite some time.

As I personally really enjoy this feature I suggest to give short presentation on what to do with this feature and then discuss on what is missing.

**Format**

Guided workshop. Probably 30-45 minutes long.

**Session goals**

Learn about this new feature and identify use cases.

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.openrefine.org/martin/32/7_2.png) [@Martin](https://forum.openrefine.org/u/Martin)\
**Post date:** [September 9, 2025, 6:46pm UTC](https://forum.openrefine.org/t/2025-barcamp-session-proposal-new-customized-clustering-feature-since-3-9/2537/2 "2025-09-09T18:46:09Z")

</div>

The shared etherpad with the notes from the call is available here [Etherpad](https://etherpad.wikimedia.org/p/openrefine-barcamp-clustering#L1)

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.openrefine.org/martin/32/7_2.png) [@Martin](https://forum.openrefine.org/u/Martin)\
**Post date:** [March 12, 2026, 8:37pm UTC](https://forum.openrefine.org/t/2025-barcamp-session-proposal-new-customized-clustering-feature-since-3-9/2537/3 "2026-03-12T20:37:42Z")

</div>

_clean up notes from the [pad](https://etherpad.wikimedia.org/p/openrefine-barcamp-custom-clustering#L1)_

## Custom clustering functions

The new clustering feature introduced in **OpenRefine 3.9** allows users to define **custom clustering functions**. It is possible to combine several clustering algorithms into a single function to speed up the process, for example:

```auto
fingerprint(value).ngramfingerprint(value)

```

Custom clustering functions can also use standard expressions. For example, the `replace()` function can remove terms that may interfere with clustering.Example use case: removing common words such as **“Place”** or **“Street”** when clustering place names.

### Related tutorials and resources

Examples and tutorials related to clustering in German:

- [Clustering](https://fdmlab.landesarchiv-bw.de/workshop/openrefine-einsteiger/05-clustering/)
- [Extended clustering](https://fdmlab.landesarchiv-bw.de/workshop/openrefine-fortgeschrittene/19-erweitertes-clustering/)
- [Python with OpenRefine](https://fdmlab.landesarchiv-bw.de/workshop/openrefine-fortgeschrittene/20-python-mit-openrefine/)

## Extending clustering with external services

Participants also discussed calling external services to expand functionality. One approach is to call external functions via **FastAPI** using Jython in OpenRefine. For example

- [FastAPI wrapper around RapidFuzzy](https://gist.github.com/b2m/91f3b812bcf0975c4d2cb3230099366a#file-rapidfuzz_fastapi-py)
- [FastAPI wrapper around spaCy](https://gist.github.com/b2m/cadf88263f7978be96c164a89968c44c)

These services can extend clustering or matching capabilities beyond what is available directly in OpenRefine.

## Documentation ideas

Thad suggested adding a **“Guidelines” subsection in the clustering documentation** to explain cases where clustering is not recommended.

There was also a suggestion to publish related material in **Programming Historian** , which would make it easier to translate tutorials and adapt examples for other languages. Example lesson referenced: [Clustering with Scikit-Learn in Python | Programming Historian](https://programminghistorian.org/en/lessons/clustering-with-scikit-learn-in-python) (see also the [Portuguese translation](https://programminghistorian.org/pt/licoes/algoritmos-agrupamento-scikit-learn-python))

## Visualizing clustering

Participants discussed possible ways to visualize how clusters are formed.

Silvia shared a **Sankey diagram** illustrating how different variants are merged into a single value:

[[Album] imgur.com ![](https://europe1.discourse-cdn.com/flex017/uploads/openrefine/original/2X/8/81ced603a2ee355f70816ff37bab63dbb5578547.png "imgur.com") ](https://imgur.com/a/bdPMq9N)

Thad suggested that **chord diagrams** could also be an alternative way to visualize clustering results.
