semvec/pypi-packages huggingface dataset:
pgsocr 0.1.5
A command line utility for converting Blu-ray subs to SRT or ASS using AI Language Models.
License: MIT
Requires Python: >=3.11

# pgsocr
Convert Blu-Ray SUP subtitles to SRT or ASS using AI Language Models or Tesseract.

### Prerequisites

If planning on using Tesseract, see: https://tesseract-ocr.github.io/tessdoc/Installation.html \
Make sure to install all the required language packs and note down the location of the 'tessdata' directory. \
Make sure to set the TESSDATA_PREFIX environment variable to the location of the 'tessdata' directory from the previous step.

### Installation

Download the latest .whl from the Releases tab and install using pip. \
Make sure to install the [lm] extras if you want to use AI models.

### Usage:

    Options:
    -i: Specify the path to the SUP file or (batch mode) directory.
    -o: Specify the path to the output directory.
    -m: Specify the OCR engine to use (florence2 or tesseract or minicpmv).
    -l: (Only if using Tesseract) Specify the list of languages to use separated by spaces. Defaults to English.
    -b: (Only if using Tesseract) Specify a custom character blacklist for Tesseract. Enter an empty string to turn off the default blacklist.
    -f: Specify the output format (SRT or ASS). ASS output also has support for subtitle positioning.

    Note: The AI models are more accurate than Tesseract but far more resource heavy. A recent GPU with a large amount of VRAM is recommended.

    Examples:
    # Single file
    pgsocr -i /path/to/file -o path/to/outputdir -m tesseract -l eng jpn

    # Multiple files in a directory
    pgsocr -i /path/to/inputdir -o /path/to/outputdir -m florence2
melinda 0.1.1
Synthetic data generation.
License: MIT
Requires Python: <4.0,>=3.8
Keywords: synthetic data, augmentation, generative models, tabular data

# Welcome to LINDA

``MELINDA`` is a python library for creating tabular synthetic data. 
It uses various generative models in artificial intelligence 
to learn statistical properties from your real data and 
use them to generate synthetic data.

## Installation
```python
git clone https://github.com/hse-cs/LINDA.git
cd LINDA
pip install -e .
```
or
```python
poetry install
```

## Basic usage
The following code snippet creates an example of real data, fits a generative model, and samples synthetic data.
```python
import numpy as np
import pandas as pd
from melinda.models import ProbaformsSynthesizer
from probaforms.models import CVAE

# generate an example of real data
n = 100
data_real = pd.DataFrame()
data_real['col_1'] = np.random.rand(n)
data_real['col_2'] = np.random.rand(n)
data_real['col_3'] = [str(i) for i in np.random.randint(0, 10, n)]
data_real['col_4'] = [str(i) for i in np.random.randint(0, 5, n)]

num_cols = ['col_1', 'col_2']
cat_cols = ['col_3', 'col_4']
lab_cols = None

# fit a generative model
model = CVAE(latent_dim=10, hidden=(10,), lr=0.001, n_epochs=10)
gen = ProbaformsSynthesizer(model, num_cols, cat_cols, lab_cols, cat_transform='OneHotEncoder')
gen.fit(data_real)

# sample synthetic data
data_synthetic = gen.sample(n_samples=10)
data_synthetic.head()
```