Datasets:
The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: TypeError
Message: Couldn't cast array of type
list<item: struct<term: string, ontology_id: string, note: string>>
to
{'term': List(Value('string')), 'ontology_id': List(Value('string')), 'note': List(Value('string'))}
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2303, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1852, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2149, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
TypeError: Couldn't cast array of type
list<item: struct<term: string, ontology_id: string, note: string>>
to
{'term': List(Value('string')), 'ontology_id': List(Value('string')), 'note': List(Value('string'))}Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
OWS2 Dataset 1 — Semantic Alignment for Food Transformation & Plant Ontologies
Dataset Summary
ows2_dataset_1 is a curated dataset for training and evaluating Bi-Encoder models (e.g., all-MiniLM-L6-v2) on semantic ontology alignment in the food transformation and plant biology domains.
Each example pairs a scientific sentence with a set of positive ontology terms (relevant concepts) and, when available, negative terms (hard distractors). The dataset is designed to bring complex scientific sentences and domain-specific ontology terms into a shared semantic vector space.
Note — First iteration. This is
v1of the dataset. The volume of real annotated data remains intentionally limited at this stage, as the dataset is expected to grow iteratively through successive annotation campaigns and pipeline improvements.
The dataset covers concepts from several ontologies:
- TransformON (TFO) — Food transformation and processing ontology
- Plant Ontology (PO) — Plant anatomy and developmental stages
- Trait Ontology (TO) — Plant traits
Splits
| Split | Num. examples | Description |
|---|---|---|
train |
14 919 | Training split — mix of LLM-generated and real sentences |
test |
100 | Gold standard — manually validated sentence-term pairs |
Real data volume. As a first iteration, real annotated examples represent only a small fraction of the train split (~491 out of 14 919). The proportion of real, expert-validated data is expected to increase in future versions as annotation campaigns progress.
Data Structure
Each record is a JSON object with the following fields for real data :
{
"sentence_id": "ABS_10.3390/antiox11010133_3",
"model_semantique_source": "S-PubMedBert-MS-MARCO",
"source": "10.3390/antiox11010133",
"sentence": "The canonical reactive oxygen species (ROS)-scavenging mode ...",
"positive_terms": [
{"term": "antioxidants", "ontology_id": "TFO:tHfHTb"},
{"term": "flavonoid", "ontology_id": "CHEBI:47916", "note": "Proposition manuelle sans ID d'ontologie"}
],
"negative_terms": [
{"term": "xanthophyll", "ontology_id": "TFO:2zpu01"}
]
}
and here an example of synthetic data :
{
"sentence_id": "SYNTH_v0_9241",
"model_semantique_source": "synthetic",
"source": "synthetic",
"sentence": "The experimental group consumed a diet enriched with dehulled oak seeds, demonstrating improved digestive efficiency.",
"positive_terms": [
{"term": "acorn, dehulled (feed)", "ontology_id": "TFO:TTN7SQ"}
],
"negative_terms": []
}
Fields
| Field | Type | Description |
|---|---|---|
sentence_id |
string |
Unique identifier. Prefix ABS_ = real abstract sentence; SYNTH_v0_ = synthetic sentence |
model_semantique_source |
string |
Model used for candidate term retrieval (S-PubMedBert-MS-MARCO, all-MiniLM-L6-v2, BioLORD-2023, synthetic) |
source |
string |
DOI of origin article, or synthetic for generated sentences |
sentence |
string |
Scientific sentence (input text) |
positive_terms |
list[dict] |
Relevant ontology terms (anchors for similarity) |
negative_terms |
list[dict] |
Irrelevant terms that were rejected (hard negatives) |
Train Split — Source Breakdown
| Source type | Count |
|---|---|
| Synthetic (LLM-generated) | 14 428 |
| Real scientific abstracts (DOI-based) | 491 |
A note on multiple positives and unfolding
Each sentence can carry one or more positive terms (positive_terms is a list). For training with pair-based losses such as MNRL, the recommended approach is to unfold the dataset: each (sentence, positive_term) pair becomes an independent training example. This increases the effective size of the training set and ensures each ontology term is explicitly associated with its sentence during optimization.
# Example unfolding
pairs = [
(example["sentence"], term["term"])
for example in dataset["train"]
for term in example["positive_terms"]
]
A note on negatives
Synthetic examples (SYNTH_v0_*) — the vast majority of the train split — carry no explicit negative terms (negative_terms is an empty list). Hard negatives are only provided for manually annotated real examples.
To compensate for this absence during training, we rely on in-batch negatives: within each mini-batch, all positive terms from other examples act as implicit negatives for a given sentence. This strategy is made effective by using Multiple Negatives Ranking Loss (MNRL), which is the recommended loss function for this dataset. The unfolding strategy described above further enriches the batch diversity, making in-batch negatives more effective.
Test Split — Gold Standard
The test split (dataset_goldtest.jsonl) contains 100 manually annotated examples drawn from real peer-reviewed scientific articles. Each sentence-term pair was validated by domain experts.
Articles covered include publications on:
- Apple polyphenols and cider chemistry
- Lentil texture and cooking behavior
- Wine oxidative stability
- Plant secondary metabolites and antioxidants
Construction Pipeline
The dataset was built using the DatasetBuilder module of the OWS2 pipeline:
- Abstract extraction — Scientific abstracts retrieved from PubMed/ISTEX
- Candidate term retrieval — Top-k ontology terms retrieved via semantic similarity (Bi-Encoder)
- Annotation — Manual validation and positive/negative labeling via the Check_Annotations Streamlit app
- Synthetic enrichment — LLM-generated sentence-term pairs covering sparse ontology regions
Intended Use
This dataset is intended for:
- Fine-tuning Bi-Encoder models (e.g.,
sentence-transformers/all-MiniLM-L6-v2) primarily with Multiple Negatives Ranking Loss (MNRL), which leverages in-batch negatives to compensate for the low density of explicit hard negatives in synthetic examples - Evaluating semantic alignment between scientific text and ontology terms (gold
testsplit) - Research on ontology-grounded sentence embeddings in food transformation and plant biology
Citation
If you use this dataset, please cite the OWS2 project:
@dataset{ows2_dataset_1,
title = {OWS2 Dataset 1 — Semantic Alignment for Food and Plant Ontologies},
year = {2026},
license = {CC BY 4.0},
}
License
This dataset is released under the Creative Commons Attribution 4.0 (CC BY 4.0) license.
- Downloads last month
- -