All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.niklasfi.rx.ThrottlerSingle Maven / Gradle / Ivy

Go to download

Swiftly add ocr layers to scanned pdf files. Unfortunately existing open source ocr solutions (tesseract) pale in comparison with the ones commercially available. The azure read api provides particularly good results. It is also easy to set up, but while it can annotate text in images, there is no easy way to upload and ocr a full pdf document. That is, until now. aocr provides an easy way to ocr full pdf documents.

There is a newer version: 2.4
Show newest version
package de.niklasfi.rx;

import io.reactivex.rxjava3.core.Single;
import io.reactivex.rxjava3.core.SingleSource;
import io.reactivex.rxjava3.functions.Function;

import java.time.temporal.TemporalAmount;
import java.util.concurrent.TimeUnit;

public class ThrottlerSingle extends ThrottlerBase implements Function> {

    public ThrottlerSingle(TemporalAmount minInterval) {
        super(minInterval);
    }

    @Override
    public SingleSource apply(R r) {
        final var delayMs = getNextSlotDelay();
        return Single.just(r).delay(delayMs, TimeUnit.MILLISECONDS);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy