Skip to content

Instantly share code, notes, and snippets.

View tteofili's full-sized avatar

Tommaso Teofili tteofili

View GitHub Profile
@tteofili
tteofili / srr.ipynb
Last active July 10, 2026 13:46
SRR NB
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tteofili
tteofili / pyosq.py
Last active April 17, 2026 14:36
pyosq
"""
python port of Apache Lucene's OptimizedScalarQuantizer.
source: lucene/core/src/java/org/apache/lucene/util/quantization/OptimizedScalarQuantizer.java
overview
------------------
OSQ is a *per-vector* scalar quantizer based on three main ideas:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Instructions for evaluating ER explanations with CERTEM

  1. create a new Google Colab Notebook
  2. open the CERTEM-demo Google Colab Notebook at https://colab.research.google.com/drive/1e9L4Edbm3_X4V_xH7EFkxsmT3wE4Qwca?usp=sharing
  3. copy each cell from CERTEM-demo.ipynb into your newly created notebook (in the very same order)
  4. Run all cells (Runtime -> Run all)
  5. Once all cells are loaded you should see something like this
  6. Select one of the datasets in the dropdown menu, either BA or AB (avoid IA because of visualization issues)
  7. Select one of the existing models by checking one of the boxes DeepER, DeepMatcher, Ditto.
@tteofili
tteofili / pdp_example.ipynb
Last active December 13, 2022 10:15
TrustyAI PDP Example Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
labels:
opendatahub.io/notebook-image: "true"
annotations:
opendatahub.io/notebook-image-url: "https://github.com/thoth-station/s2i-generic-data-science-notebook"
opendatahub.io/notebook-image-name: "Standard Data Science"
opendatahub.io/notebook-image-desc: "Jupyter notebook data science image with TrustyAI library installed"
name: s2i-generic-data-science-notebook
/*
* Anserini: A Lucene toolkit for reproducible information retrieval research
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Anserini: A Lucene toolkit for reproducible information retrieval research
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software