README
This repository contains the code for training and inferring the concept embeddings described in this study:
Rubehn, A. (2026). Inductive Learning of Concept Embeddings from Cross-Linguistic Colexification Patterns with Textual Attributes. arXiv preprint.
If you use this package in your work, please cite the work above accordingly.
Note: If you are interested in the code behind the paper by Rubehn and List (2025), please check out v1.0 of this repository.
Quickstart
This package can be installed from PyPi using:
pip install conceptembeddings
The package includes a wrapper for the pretrained model. It requires that Concepticon data are cloned on your device.
from conceptembeddings import ConceptEmbeddings
from pyconcepticon import Concepticon
concepticon = Concepticon("path/to/concepticon-data")
ce = ConceptEmbeddings(concepticon=concepticon)
# embed a concept defined in Concepticon
emb_water = ce("WATER")
# embed a concept with a custom definition
emb_orc = ce.embed_definition("A fictional, aggressive humanoid creature common in fantasy literature and games")
If you have set up a "global" instance of Concepticon with cldfbench, you can instantiate a ConceptEmbeddings object without passing a Concepticon instance:
ce = ConceptEmbeddings() # tries to access a globally defined Concepticon instance
Study Replication
To replicate the full workflow of our study, follow these steps:
1. Install dependencies
Build the source code and install all necessary dependencies by running:
pip install -e .[eval]
If you are only interested in training the concept embeddings, it is sufficient to run:
pip install -e .
2. Clone Concepticon data
The training procedure assumes that you have a copy of the Concepticon data at the root of this repository. Clone the data first by running:
git clone --depth 1 --branch v3.4.0 https://github.com/concepticon/concepticon-data
3. Extract the graph data (optional)
The files in data/graphs were created using the scripts data/create_graph.py (colexifications from IDS) and data/create_graph_clics.py (CLICS4, CLIPS), accessing the CLLD Concepticon via its Python API pyconcepticon. Simply running the Python script will create the JSON files.
4. Train the model
Train the model by running:
python run.py --config config.yaml
Hyperparameters are set as described in the study; you can adjust them by modifying config.yaml.
5. Evaluation
eval contains all materials required for the evaluation and visualization discussed in the paper. Some scripts rely on data from NoRaRe which must be downloaded first. For this, run:
cd eval/data/norare && make
Metadata
Release files for conceptembeddings 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| conceptembeddings-2.0.1.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| conceptembeddings-2.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 2.1 MB
Release files / conceptembeddings-2.0.1.tar.gz
| Download URL | conceptembeddings-2.0.1.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b52145d24fb6fd8e30fe0d10c54108a3130e1ed3b8f97f12d60273907f91422
|
|
BLAKE2b-256 checksum How to use checksums |
6f4431956f300ffd788960fae4cda46837593116ffb47af981b11435b164ed86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logRelease files / conceptembeddings-2.0.1-py2.py3-none-any.whl
| Download URL | conceptembeddings-2.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
bdfe027a187397ec4e79c25526dff1c3828e9b45bb54d101a13b609e9cdee30b
|
|
BLAKE2b-256 checksum How to use checksums |
b08614db7d8a5fd12bd8fcb9c46dba7b920fea281f86de19b25137f5bfca5d50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency log