The dataset viewer is not available for this split.
Error code: StreamingRowsError Exception: ValueError Message: Not able to read records in the JSON file at hf://datasets/mevol/protein_structure_NER_independent_val_set@9c98b22f5aaa4005d0b27f06939fe4c267f1eb68/annotation_JSON/annotations.json. You should probably indicate the field of the JSON file containing your records. This JSON file contain the following fields: ['PMC5173035', 'PMC4993997', 'PMC5014086', 'PMC5063996', 'PMC4980666', 'PMC4817029', 'PMC5012862', 'PMC4981400', 'PMC4806292', 'PMC5603727']. Select the correct one and provide it as `field='XXX'` to the dataset loading method. Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/utils.py", line 96, in get_rows_or_raise return get_rows( File "/src/libs/libcommon/src/libcommon/utils.py", line 197, in decorator return func(*args, **kwargs) File "/src/services/worker/src/worker/utils.py", line 73, in get_rows rows_plus_one = list(itertools.islice(ds, rows_max_number + 1)) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1389, in __iter__ for key, example in ex_iterable: File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 282, in __iter__ for key, pa_table in self.generate_tables_fn(**self.kwargs): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 170, in _generate_tables raise ValueError( ValueError: Not able to read records in the JSON file at hf://datasets/mevol/protein_structure_NER_independent_val_set@9c98b22f5aaa4005d0b27f06939fe4c267f1eb68/annotation_JSON/annotations.json. You should probably indicate the field of the JSON file containing your records. This JSON file contain the following fields: ['PMC5173035', 'PMC4993997', 'PMC5014086', 'PMC5063996', 'PMC4980666', 'PMC4817029', 'PMC5012862', 'PMC4981400', 'PMC4806292', 'PMC5603727']. Select the correct one and provide it as `field='XXX'` to the dataset loading method.
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.
Overview
This data was used to evaluate the two models below to decide whether convergence was reached. https://huggingface.co/PDBEurope/BiomedNLP-PubMedBERT-ProteinStructure-NER-v2.1 https://huggingface.co/PDBEurope/BiomedNLP-PubMedBERT-ProteinStructure-NER-v3.1
There are 20 different entity types in this dataset: "bond_interaction", "chemical", "complex_assembly", "evidence", "experimental_method", "gene", "mutant", "oligomeric_state", "protein", "protein_state", "protein_type", "ptm", "residue_name", "residue_name_number","residue_number", "residue_range", "site", "species", "structure_element", "taxonomy_domain"
Annotation was carried out with the free annotation tool TeamTat (https://www.teamtat.org/) and documents were downloaded as BioC XML before converting them to IOB, annotation only JSON and CSV format.
The number of annotations and sentences in each file is given below:
document ID | number of annotations in BioC XML | number of annotations in IOB/JSON/CSV | number of sentences |
---|---|---|---|
PMC5173035 | 885 | 885 | 195 |
PMC4993997 | 1052 | 1051 | 217 |
PMC5014086 | 676 | 676 | 136 |
PMC5063996 | 1048 | 1046 | 243 |
PMC4980666 | 669 | 669 | 164 |
PMC4817029 | 897 | 897 | 180 |
PMC5012862 | 2203 | 2202 | 438 |
PMC4981400 | 570 | 570 | 121 |
PMC4806292 | 760 | 760 | 167 |
PMC5603727 | 1353 | 1353 | 240 |
total | 10113 | 10109 | 2101 |
Documents and annotations are easiest viewed by using the BioC XML files and opening them in free annotation tool TeamTat (https://www.teamtat.org/). More about the BioC format can be found here: https://bioc.sourceforge.net/
Raw BioC XML files
These are the raw, un-annotated XML files for the publications in the dataset in BioC format. The files are found in the directory: "raw_BioC_XML" There is one file for each document and they follow standard naming "unique PubMedCentral ID"_raw.xml
Annotations in IOB format
The IOB formated files can be found in the directory: "annotation_IOB". There is one file for each document in the dataset and they all follow the naming "unique PubMedCentral ID".tsv.
Annotations in BioC JSON
The BioC formated JSON files of the publications have been downloaded from the annotation tool TeamTat. The files are found in the directory: "annotated_BioC_JSON" There is one file for each document and they follow standard naming "unique PubMedCentral ID"_ann.json
Each document JSON contains the following relevant keys:
- "sourceid" --> giving the numerical part of the unique PubMedCentral ID
- "text" --> containing the complete raw text of the publication as a string
- "denotations" --> containing a list of all the annotations for the text
Each annotation is a dictionary with the following keys:
- "span" --> gives the start and end of the annotatiom span defined by sub keys:
- "begin" --> character start position of annotation
- "end" --> character end position of annotation
- "obj" --> a string containing a number of terms that can be separated by ","; the order of the terms gives the following: entity type, reference to ontology, annotator, time stamp
- "id" --> unique annotation ID
Here an example:
[{"sourceid":"4784909",
"sourcedb":"",
"project":"",
"target":"",
"text":"",
"denotations":[{"span":{"begin":24,
"end":34},
"obj":"chemical,CHEBI:,melaniev@ebi.ac.uk,2023-03-21T15:19:42Z",
"id":"4500"},
{"span":{"begin":50,
"end":59},
"obj":"taxonomy_domain,DUMMY:,melaniev@ebi.ac.uk,2023-03-21T15:15:03Z",
"id":"1281"}]
}
]
Annotations in BioC XML
The BioC formated XML files of the publications have been downloaded from the annotation tool TeamTat. The files are found in the directory: "annotated_BioC_XML" There is one file for each document and they follow standard naming "unique PubMedCentral ID_ann.xml
The key XML tags to be able to visualise the annotations in TeamTat as well as extracting them to create the training data are "passage" and "offset". The "passage" tag encloses a text passage or paragraph to which the annotations are linked. "Offset" gives the passage/ paragraph offset and allows to determine the character starting and ending postions of the annotations. The tag "text" encloses the raw text of the passage.
Each annotation in the XML file is tagged as below:
- "annotation id=" --> giving the unique ID of the annotation
- "infon key="type"" --> giving the entity type of the annotation
- "infon key="identifier"" --> giving a reference to an ontology for the annotation
- "infon key="annotator"" --> giving the annotator
- "infon key="updated_at"" --> providing a time stamp for annotation creation/update
- "location" --> start and end character positions for the annotated text span
- "offset" --> start character position as defined by offset value
- "length" --> length of the annotation span; sum of "offset" and "length" creates the end character position
Here is a basic example of what the BioC XML looks like. Additional tags for document management are not given. Please refer to the documenttation to find out more.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE collection SYSTEM "BioC.dtd">
<collection>
<source>PMC</source>
<date>20140719</date>
<key>pmc.key</key>
<document>
<id>4784909</id>
<passage>
<offset>0</offset>
<text>The Structural Basis of Coenzyme A Recycling in a Bacterial Organelle</text>
<annotation id="4500">
<infon key="type">chemical</infon>
<infon key="identifier">CHEBI:</infon>
<infon key="annotator">melaniev@ebi.ac.uk</infon>
<infon key="updated_at">2023-03-21T15:19:42Z</infon>
<location offset="24" length="10"/>
<text>Coenzyme A</text>
</annotation>
</passage>
</document>
</collection>
Annotations in CSV
The annotations and the relevant sentences they have been found in have also been made available as tab-separated CSV files, one for each publication in the dataset. The files can be found in directory "annotation_CSV". Each file is named as "unique PubMedCentral ID".csv.
The column labels in the CSV files are as follows:
- "anno_start" --> character start position of the annotation
- "anno_end" --> character end position of the annotation
- "anno_text" --> text covered by the annotation
- "entity_type" --> entity type of the annotation
- "sentence" --> sentence text in which the annotation was found
- "section" --> publication section in which the annotation was found
Annotations in JSON
A combined JSON file was created only containing the relevant sentences and associated annotations for each publication in the dataset. The file can be found in directory "annotation_JSON" under the name "annotations.json".
The following keys are used:
- "PMC4850273" --> unique PubMedCentral of the publication
- "annotations" --> list of dictionaries for the relevant, annotated sentences of the
document; each dictionary has the following sub keys
- "sid" --> unique sentence ID
- "sent" --> sentence text as string
- "section" --> publication section the sentence is in
- "ner" --> nested list of annotations; each sublist contains the following items: start character position, end character position, annotation text, entity type
Here is an example of a sentence and its annotations:
{"PMC4850273": {"annotations":
[{"sid": 0,
"sent": "Molecular Dissection of Xyloglucan Recognition in a Prominent Human Gut Symbiont",
"section": "TITLE",
"ner": [
[24,34,"Xyloglucan","chemical"],
[62,67,"Human","species"],]
},]
}}
- Downloads last month
- 67