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

de.niklasfi.rx.ThrottlerFlowable 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.Flowable;
import io.reactivex.rxjava3.functions.Function;
import org.reactivestreams.Publisher;

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

public class ThrottlerFlowable extends ThrottlerBase implements Function> {
    public ThrottlerFlowable(TemporalAmount minInterval) {
        super(minInterval);
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy