semvec/pypi-packages huggingface dataset:
pubtator2dataset 0.0.4
Utility to retrieve (annotated) text from PubTator
Requires Python: >=3.6

# pubtator2dataset

A Python library that provides interfaces to download annotated articles from PubTator Central.

The primary aim of this library is to offer easy access to text data for text mining or annotation projects. 

For this reason the focus of the interfaces is on the text fields, although metadata might be included in the future.

The interface is decomposed in:

- PubTatorFetcher: makes the request via [Eutils](https://www.ncbi.nlm.nih.gov/books/NBK25500/) and retrieve the (annotated) texts
- PubTatorParser: parse the raw text the generate a structured object
- PubTatorDownloader: combines the previous two

## How to

In order to download the annotated datasets it is possible to:

- pass an iterable containing the document IDs (PubMed ID or PMC ID) or a file where each line contains one ID:

```python

from pubtator2dataset import PubTatorDownloader

ptd = PubTatorDownloader(email = 'your email',
                         db = 'pubmed', 
                         out_format = 'biocxml', 
                         bioconcepts = 'all', 
                         batch_size = 10, 
                         loglevel = 'DEBUG')

pmids = [28483577, 28483579]

for d in ptd.get(source = pmids):
    
    print(d)
```


- write a PubMed query which will collect the relevant IDs

```python

from pubtator2dataset import PubTatorDownloader

ptd = PubTatorDownloader(email = 'your email',
                         db = 'pubmed', 
                         out_format = 'biocxml', 
                         bioconcepts = 'all', 
                         batch_size = 10, 
                         loglevel = 'DEBUG')

query = "MyoD+AND+Tapscott+SJ[au]"

for d in ptd.get(source = query):
    
    print(d)
```

It is left to the user to save the output in the corresponding format, i.e. with BioC or plain text file.
yaerrrr 1.14.4
Generate ER diagrams with python and graphviz
Requires Python: >=3.6

# Introduction

The packages allows you to programmatically create ER diagrams.
The pacakges is simple, but it should help you generate ER diagrams like the one provided by Chen.

# Installation

```
pip install yaerrrr
```

# Example

A single ER can be generated as follows:

```
import yaerrrr


class TestEr(yaerrrr.AbstractYaerrrrScript):

    def generate_er(self, context: 'yaerrrr.YaerrrContext') -> "yaerrrr.ErDiagram":
        er = context.er

        er.add_entity(name="authors", fields=[
            er.generate_primary_id_key(),
        ])
        er.add_entity(name="books", fields=[
            er.generate_primary_id_key()
        ])
        er.add_1_to_0_n("authors", "books", "writes")

        return er


def main():
    x = TestEr()
    x.run("output.svg")


if __name__ == "__main__":
    main()

```

and it outputs (for now):

![ER](output.svg "ER")