public static AzureOcrEngine Build(IAzureVisionConfigurations configurations) { var createCoords = new AzureCreateRelativeCoordinate(new CreateRelativeCoordinate()); return(new AzureOcrEngine(new AzureOcrApi(configurations), OcrPreProcessing.Build(), new AzureOcrParser( new TransformLinesIntoSentences(new AddSentencesAndReturnNewIndex( new TransformAzureLineIntoSentence(createCoords, new CreateWordFromAzureWord(createCoords)))), new SortIntoLogicalLines(), new GetLinesOrderedByTopPosition()))); }
public AzureOcrApi(IAzureVisionConfigurations azureVisionConfigurations) { _client = new VisionServiceClient(azureVisionConfigurations.SubscriptionKey); }
public AzureOcrApi(IAzureVisionConfigurations azureVisionConfigurations, IStreamToByteContent streamToByteContent, IHttpClientBuilder httpClientBuilder) { _streamToByteContent = streamToByteContent; _httpClientBuilder = httpClientBuilder; _config = azureVisionConfigurations; }