Skip to content

index

Terminal window
(oc-meta) arcangelo@serverGrosso:/mnt/arcangelo/qlever-meta-data/indices$ qlever index-stats
Command: index-stats
Breakdown of the time used for building the index, based on the timestamps for key lines in "meta-data.index-log.txt"
Parse input : 1.4 h
Build vocabularies : 0.4 h
Convert to global IDs : 0.2 h
Permutation SPO & SOP : 0.2 h
Permutation OSP & OPS : 0.3 h
Permutation PSO & POS : 0.1 h
Permutation PSO & POS : 0.3 h
TOTAL time : 2.9 h
Breakdown of the space used for building the index
Files index.* : 65.3 GB
Files vocabulary.* : 27.4 GB
TOTAL size : 92.7 GB
Terminal window
(oc-meta) arcangelo@serverGrosso:/mnt/arcangelo/qlever-meta-data/indices$ qlever index-stats
Command: index-stats
Breakdown of the time used for building the index, based on the timestamps for key lines in "meta-data.index-log.txt"
Parse input : 1.4 h
Build vocabularies : 0.4 h
Convert to global IDs : 0.2 h
Permutation SPO & SOP : 0.2 h
Permutation OSP & OPS : 0.3 h
Permutation PSO & POS : 0.1 h
Permutation PSO & POS : 0.3 h
**Text index : 4.1 h**
TOTAL time : 7.0 h
Breakdown of the space used for building the index
Files index.* : 65.3 GB
Files vocabulary.* : 27.4 GB
**Files text.* : 29.2 GB**
TOTAL size : 121.8 GB

DOI-ORCID index 2025: https://doi.org/10.5281/zenodo.18881876

arcangelo7Mar 5, 2026 · opencitations/oc_ds_converter

build: migrate from poetry to uv package manager

+1229-24612ffaab0
arcangelo7Mar 5, 2026 · opencitations/oc_ds_converter

test: add HTTP mocking infrastructure with pytest and responses

+1185-10ddadb5b
arcangelo7Mar 5, 2026 · opencitations/oc_ds_converter

fix(doi): only attempt DOI repair when API service is enabled

Previously the DOI cleaning logic was applied unconditionally during normalization. Now malformed DOIs are only repaired when API validation is enabled, with the API called before and after repair to verify the corrected DOI actually exists.

+351-1419093d88
arcangelo7Mar 8, 2026 · opencitations/oc_ds_converter

refactor(crossref)!: auto-generate publishers file from Crossref API

The publishers CSV is now automatically downloaded from the Crossref API at startup and stored in oc_ds_converter/crossref/data/publishers.csv. This removes the need for users to manually provide or maintain the file.

BREAKING CHANGE: The -p/--publishers CLI argument has been removed. The publishers file is now generated automatically.

+279-23dd6496a
arcangelo7Mar 8, 2026 · opencitations/oc_ds_converter

feat(crossref): store DOI-ORCID index in Redis for multiprocessing

Previously, each worker loaded the entire ORCID index from disk, causing severe performance degradation when processing large batches. Now the index is loaded once into Redis at startup and shared across all workers.

The -o flag behavior changes: if specified, the Redis index is cleared and reloaded from the directory; if omitted, the existing index is used.

+259-43d4c2ed4
arcangelo7Mar 9, 2026 · opencitations/oc_ds_converter

feat(crossref): add Redis publishers storage and age-based regeneration

Store publishers mapping in Redis for multiprocessing scenarios, avoiding memory duplication across worker processes. Add file age checking to skip unnecessary API calls when publishers.csv is recent.

New CLI options:

  • --update-publishers: force regeneration ignoring age
  • --publishers-max-age: days before automatic update (default 30)
+475-31c01039b
arcangelo7Mar 9, 2026 · opencitations/oc_ds_converter

refactor(storage)!: make Redis the only storage backend

Remove SqliteStorageManager and InMemoryStorageManager. All ID managers and processing classes now use RedisStorageManager exclusively, with a testing parameter to switch between real Redis and fakeredis.

The temporary batching during file processing uses a new lightweight BatchManager class (simple dict wrapper).

BREAKING CHANGE: CLI arguments --storage_path and --redis_storage_manager removed.

+903-16044df3775
arcangelo7Mar 9, 2026 · opencitations/oc_ds_converter

perf(crossref): only invoke BeautifulSoup when the text actually contains angle brackets

+10-123ee7afc
arcangelo7Mar 10, 2026 · opencitations/oc_ds_converter

perf(crossref): prefetch DOI-ORCID index

Replace individual Redis lookups with batch prefetch via pipeline. Normalize DOIs with prefix during index loading for consistent keys. Simplify orcid_finder to use in-memory cache populated by prefetch.

+78-2599e4f57

Prima: orcid_finder: 4-4.6s per file Dopo: orcid_finder: 0.31-0.44s

# 1) ORCID nei metadati
# E ok
# 2) Indice DOI→ORCID
# E ok
# 3) Fallback Redis snapshot (se presente e univoca o coerente con l'indice)
if not oc and getattr(self, "_redis_values_ra", None):
for oc_snap in self._redis_values_ra:
oc_norm = self.orcid_m.normalise(oc_snap, include_prefix=True)
if oc_norm:
if len(self._redis_values_ra) == 1 or (
raw_index and oc_norm.split(":", 1)[1] in str(raw_index)):
oc = oc_norm
break
# ???

Tradotto

  • Se c’è UN SOLO ORCID in tutto il file → assegnalo a questo autore
  • OPPURE se l’ORCID appare in raw_index → assegnalo
  1. Caso “un solo ORCID”: Se nel file ci sono 5000 item con 10 autori ciascuno, e solo UN autore ha l’ORCID, il codice lo assegnerebbe a TUTTI gli autori. Assurdo.
  2. Caso “ORCID in raw_index”: Ma se l’ORCID è già in raw_index, allora lo step 2 avrebbe dovuto trovarlo! Se non l’ha trovato è perché il nome non matchava. E allora perché assegnarlo comunque? A quale autore?

E c’è anche un test per questo scenario

def test_get_agents_strings_list_api_disabled_redis_unprefixed_orcid(self):
"""
API OFF + nessun ORCID in metadata + indice vuoto.
Redis snapshot contiene ORCID per l'autore **senza prefisso**: deve essere apposto all'autore.
"""
cp = CrossrefProcessing(use_orcid_api=False, testing=True)
# Autore senza ORCID nei metadati
agents = [{
"given": "Chan-Ick",
"family": "Cheigh",
"role": "author"
}]
# Redis snapshot con ORCID **senza prefisso** dell'autore
raw_orcid = "0000-0002-6227-4053"
cp.update_redis_values(br=[], ra=[raw_orcid])
authors, editors = cp.get_agents_strings_list("10.9799/ksfan.2012.25.1.069", agents)
self.assertEqual(authors, ["Cheigh, Chan-Ick [orcid:0000-0002-6227-4053]"])
self.assertEqual(editors, [])
cp.orcid_m.storage_manager.delete_storage()

Questo test copre il caso “1 autore + 1 ORCID”, dove l’assegnazione ha senso. Ma in produzione questo scenario non esiste.

Questo loop da solo prendeva circa 30 secondi a file ed era l’operazione più onerosa dell’intero processo, più di tutte le chiamate alle API messe insieme! L’ho cancellato.

arcangelo7Mar 9, 2026 · opencitations/oc_ds_converter

perf(crossref): remove broken O(n²) ORCID fallback in get_agents_strings_list

The redis_fallback logic iterated through all ORCIDs from all items in the file for each author, causing quadratic complexity. The fallback also had flawed logic: it either assigned an ORCID when only one existed in the entire file (wrong for multiple authors) or checked if an ORCID was in raw_index (redundant with the name-matching step).

Loop time reduced from ~34s to ~1-2.5s per file (13-40x speedup).

+193-49413fff2
arcangelo7Mar 11, 2026 · opencitations/oc_ds_converter

refactor: remove doi_csv filtering, add exclude-existing flag

Replace the doi_csv/wanted_doi_filepath parameter with a more efficient exclude-existing mechanism. The old approach loaded all wanted DOIs into memory upfront, while the new flag checks Meta existence via Redis.

Changes:

  • Remove doi_csv parameter from RaProcessor and all processor subclasses
  • Remove -w/--wanted CLI argument from all run scripts
  • Add --exclude-existing flag that checks BR_redis before creating rows
+378-269ff9fa36
arcangelo7
arcangelo7Mar 5, 2026 · opencitations/time-agnostic-library

refactor(test): add multi-triplestore CI matrix

Also fold invalidatedAtTime into the DeltaQuery provenance query, removing the separate _batch_check_existence call.

+767-1245fe4cf6f
arcangelo7Mar 6, 2026 · opencitations/index

fix(meta2redis): fix buffer batching and replace tqdm/logger with rich

  • Fix buffer batching that was not actually flushing during processing
  • Replace tqdm with rich progress bar showing time remaining across all CSV files
  • Replace logger with rich console
  • Add --redis-only flag to skip CSV file generation
  • Remove unused imports and variables (datetime, br_ids, ra_ids, db_omid)
  • Fix TextIOWrapper issue by opening CSV files in binary mode
  • Change CSV output from append to write mode to avoid duplicates
  • Add rich to dependencies
+139-1392a07e12
arcangelo7Mar 6, 2026 · opencitations/index

perf(meta2redis): use redis pipelines and remove buffer batching

Replace individual SET operations with pipelined writes that batch all operations per file into a single network round-trip. Remove the intermediate buffer logic which was ineffective since it still performed individual Redis calls internally.

+49-875bb3149
arcangelo7Mar 6, 2026 · opencitations/index

feat(meta2redis): add multiprocessing and switch to redis SADD

Replace sequential file processing with parallel workers using multiprocessing.Pool. Switch from SET to SADD for br/ra indexes, allowing concurrent writes without conflicts. Remove global index dictionaries since accumulation now happens in Redis directly.

Add --workers CLI option to control parallelism.

+70-538c8f814
arcangelo7Mar 8, 2026 · opencitations/oc_ds_converter

refactor(redis): migrate OMID storage from string to set operations

+148-122886dd69
arcangelo7
arcangelo7Mar 6, 2026 · arcangelo7/knowledge-graphs-inversion

fix(inversion): handle column-reference subjects with rr:termType rr:IRI

For rr:column with rr:termType rr:IRI, the subject IRI is the column value itself and requires no STRAFTER/STRBEFORE extraction. Three changes make this work:

  • Fix N-Triples parser regex to handle IRIs with spaces (morph-kgc generates invalid IRIs like for column-as-IRI mappings)
  • Classify RML_REFERENCE subjects as plain references in SubjectTriple so url_decode is not applied to non-URL-encoded values
  • Remove check_column_as_iri_subject detection that incorrectly flagged the case as a mapping issue

R2RMLTC0020b now passes (26/45 instead of 25/45).

+16-25f81f981
arcangelo7
arcangelo7Mar 6, 2026 · arcangelo7/knowledge-graphs-inversion

feat(inversion): extract column values referenced exclusively by graph maps

Switch morph-kgc output to N-Quads to preserve named graph information. Extend the N-Quads parser to handle the optional 4th graph component. When a column is referenced only by rr:graphMap (not by any subject, predicate, or object term map), wrap SPARQL patterns in a GRAPH ?g clause and apply STRAFTER/STRBEFORE extraction on the graph variable.

+221-759d35f02

https://docs.astral.sh/

  • Index ha un sistema di installazione abbastanza vetusto e supporta ancora Python 3.7 che però non è più sopportato dalle GitHub Action e di conseguenza i test falliscono. Possiamo droppare da Python 3.9 compreso in giù?
  • Possiamo anche aggiornare il sistema di gestione dell’ambiente virtuale di index con UV perché altrimenti ogni modifica che viene fatta bisogna rilanciare il setup all’interno dell’ambiente virtuale.
  • È utile che meta2redis salvi in csv oltre che sul redis? lo chiedo perché chiaramente è un problema di memoria non indifferente da gestire
  • Allora, per quanto riguarda la laurea di Hubert, non ho capito, devo venire in aula freschi alle 9 il 20? Devo prepararmi in qualche modo?

Ramose

  • Estendere Ramose per prendere query testuale da query skg if e metterla nella query.
  • Test per il nuovo Ramose, per il codice
  • Entro giugno un operazione
  • Va su Trello

Aldrovandi

  • Bisogna chiedere a Silvio la tabella CSV da cui ricavare i nomi delle colonne, tabella che andrà compilata con le informazioni sui documenti che abbiamo caricato su Zenodo.

  • Ai related works c’è da aggiungere l’articolo su chad kg Vizioso

  • https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools

  • https://en.wikipedia.org/wiki/GNU_Bison

  • https://en.wikipedia.org/wiki/Yacc

  • HERITRACE

    • C’è un bug che si verifica quando uno seleziona un’entità preesistente, poi clicca sulla X e inserisce i metadati a mano. Alcuni metadati vengono duplicati.
    • Se uno ripristina una sotto entità a seguito di un merge, l’entità principale potrebbe rompersi.
  • Meta

    • Bisogna rigenerare il DOI ORCID Index
    • Matilda e OUTCITE nella prossima versione
      • Da definire le sorgenti
      • Va su Trello
    • Bisogna produrre la tabella che associa temp a OMID per produrre le citazioni.
  • OpenCitations

    • Rilanciare processo eliminazione duplicati
    • trovare tutti quelli che ci usano
  • “reference”: { “@id”: “frbr:part”, “@type”: “@vocab” } → bibreference

  • “crossref”: { “@id”: “biro:references”, “@type”: “@vocab”} → reference

  • “crossref”: “datacite:crossref”

  • oc_ocdm

    • Automatizzare mark_as_restored di default. è possibile disabilitare e fare a mano mark_as_restored.
  • https://opencitations.net/meta/api/v1/metadata/doi:10.1093/acprof:oso/9780199977628.001.0001

  • DELETE con variabile

  • Modificare Meta sulla base della tabella di Elia

  • embodiment multipli devono essere purgati a monte

  • Modificare documentazione API aggiungendo omid

  • Heritrace

    • Per risolvere le performance del time-vault non usare la time-agnostic-library, ma guarda solo la query di update dello snapshot di cancellazione.
    • Ordine dato all’indice dell’elemento
    • date: formato
    • anni: essere meno stretto sugli anni. Problema ISO per 999. 0999?
    • Opzione per evitare counting
    • Opzione per non aggiungere la lista delle risorse, che posso comunque essere cercate
    • Configurabilità troppa fatica
    • Timer massimo. Timer configurabile. Messaggio in caso si stia per toccare il timer massimo.
    • Riflettere su @lang. SKOS come use case. skos:prefLabel, skos:altLabel
    • Possibilità di specificare l’URI a mano in fase di creazione
    • la base è non specificare la sorgente, perché non sarà mai quella iniziale.
    • desvription con l’entità e stata modificata. Tipo commit
    • display name è References Cited by VA bene
    • Avvertire l’utente del disastro imminente nel caso in cui provi a cancellare un volume
  • Meta

    • Fusione: chi ha più metadati compilati. A parità di metadato si tiene l’omid più basso
    • Issue github parallelizzazione virtuoso
    • frbr:partOf non deve aggiungere nel merge: https://opencitations.net/meta/api/v1/metadata/omid:br/06304322094
    • API v2
    • Usare il triplestore di provenance per fare 303 in caso di entità mergiate o mostrare la provenance in caso di cancellazione e basta.
  • RML

  • Crowdsourcing

    • Quando dobbiamo ingerire Crossref stoppo manualmente OJS. Si mette una nota nel repository per dire le cose. Ogni mese.
    • Aggiornamenti al dump incrementali. Si usa un nuovo prefisso e si aggiungono dati solo a quel CSV.
    • Bisogna usare il DOI di Zenodo come primary source. Un unico DOI per batch process.
    • Bisogna fare l’aggiornamento sulla copia e poi bisogna automatizzare lo switch