{"id":3989,"date":"2022-03-26T12:23:16","date_gmt":"2022-03-26T11:23:16","guid":{"rendered":"https:\/\/gokhan-gokalp.com\/?p=3989"},"modified":"2022-03-27T14:43:48","modified_gmt":"2022-03-27T12:43:48","slug":"building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api","status":"publish","type":"post","link":"https:\/\/gokhan-gokalp.com\/tr\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/","title":{"rendered":"Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow&#8217;u Olu\u015fturma"},"content":{"rendered":"<p>San\u0131r\u0131m hepimiz g\u00fcn\u00fcm\u00fczde dijital d\u00f6n\u00fc\u015f\u00fcm\u00fcn \u00f6neminin ve dijitalle\u015fme ile elde edebilece\u011fimiz faydalar\u0131n fark\u0131nday\u0131zd\u0131r. Bildi\u011fimiz \u00fczere bu kapsamda bir \u00e7ok kurulu\u015f da dijital d\u00f6n\u00fc\u015f\u00fcm yolunda farkl\u0131 at\u0131l\u0131mlar ger\u00e7ekle\u015ftirmektedirler.<\/p>\n<p>Fakat bazen bu d\u00f6n\u00fc\u015f\u00fcm s\u00fcre\u00e7leri i\u00e7erisinde de farkl\u0131 zorluklarla kar\u015f\u0131la\u015fabilmekteyiz. \u00d6rne\u011fin <strong>data<\/strong>&#8216;n\u0131n dijitalle\u015ftirilmesi s\u00fcre\u00e7lerinde insan g\u00fcc\u00fc gerektiren baz\u0131 durumlar\u0131n bulunmas\u0131 gibi. \u00d6rne\u011fin tedarik\u00e7ilerden ald\u0131\u011f\u0131m\u0131z faturalar veya teknik bak\u0131m raporlar\u0131 gibi dok\u00fcmanlar\u0131n\/data&#8217;lar\u0131n insan g\u00fcc\u00fc gerektirerek dijitalle\u015ftirilebilmesini, bu kapsamda d\u00fc\u015f\u00fcnebiliriz. Genel olarak bu gibi durumlar\u0131n minimize edilebilmesi, zaman ve maliyetin azalt\u0131labilmesi i\u00e7in olduk\u00e7a \u00f6nem ta\u015f\u0131maktad\u0131r. Neyseki bu tarz s\u00fcre\u00e7ler i\u00e7in, <em>Optical Character Recognition<\/em> (OCR) gibi teknolojilerden yararlanabilmekteyiz.<\/p>\n<p><em>OCR<\/em>, resim ve <em>PDF<\/em> gibi dok\u00fcmanlar \u00fczerindeki metin i\u00e7eriklerini, bir insan taraf\u0131ndan tekrar yaz\u0131lmas\u0131na gerek kalmadan dijital bir hale getirebilmemize olanak sa\u011flayan bir teknolojidir.<\/p>\n<p>Bu makale kapsam\u0131nda ise <em>Azure<\/em>&#8216;un bizlere sunmu\u015f oldu\u011fu <strong>serverless<\/strong> ve <strong>managed <\/strong>hizmetlerinden yararlanarak, nas\u0131l otomatikle\u015ftirilmi\u015f bir <em>OCR workflow<\/em>&#8216;u olu\u015fturabilece\u011fimize bir bakaca\u011f\u0131z.<\/p>\n<h2>Senaryo<\/h2>\n<p>Diyelim ki farkl\u0131 domain&#8217;ler taraf\u0131ndan <em>PDF<\/em> format\u0131nda dok\u00fcmanlar\u0131n g\u00f6nderildi\u011fi ve y\u00f6netildi\u011fi bir dok\u00fcman y\u00f6netim domain&#8217;i \u00fczerinde \u00e7al\u0131\u015f\u0131yoruz. Bizden istenen geli\u015ftirmenin ise zaman ve insan g\u00fcc\u00fcn\u00fc en aza indirebilmek i\u00e7in <em>PDF<\/em> format\u0131nda g\u00f6nderilen bu dok\u00fcmanlar\u0131n, i\u00e7erdikleri metinler ile birlikte otomatik olarak sistem i\u00e7erisine aktar\u0131labilmesi oldu\u011funu d\u00fc\u015f\u00fcnelim.<\/p>\n<p>Ayr\u0131ca bizden istenen fonksiyonaliteyi h\u0131zl\u0131 bir \u015fekilde teslim edebilmek ve herhangi bir server\/infrastructure operasyonu ile de vakit kaybetmemek i\u00e7in, olabildi\u011fince <em>Azure<\/em>&#8216;un <strong>serverless<\/strong> ve <strong>managed<\/strong> teknolojilerinden yararlanmaya karar verdi\u011fimizi de d\u00fc\u015f\u00fcnelim.<\/p>\n<p>Bu kapsamda ilk olarak dok\u00fcmanlar\u0131n <em>Azure<\/em> taraf\u0131nda upload edilebilece\u011fi bir <em>Azure Function<\/em> geli\u015ftirece\u011fiz. Bu function ile ise ilgili dok\u00fcmanlar\u0131 bir <em>Azure Blob Storage<\/em> hizmeti \u00fczerinde depolayaca\u011f\u0131z. Daha sonra ise ilgili dok\u00fcmanlar i\u00e7in <em>OCR<\/em> i\u015flemini otomatik olarak entegre bir hale getirebilmek i\u00e7in, <em>Azure<\/em> <em>Logic Apps<\/em> ile bir workflow olu\u015fturaca\u011f\u0131z. Workflow i\u00e7erisinde <em>OCR<\/em> i\u015flemlerini ger\u00e7ekle\u015ftirdikten sonra ise, ilgili dok\u00fcmanlar\u0131n <em>OCR<\/em> sonu\u00e7lar\u0131n\u0131 <em>Cosmos DB<\/em> hizmeti \u00fczerinde kaydedece\u011fiz.<\/p>\n<p>\u00d6zetle makalenin sonunda a\u015fa\u011f\u0131daki gibi bir mimariye sahip olaca\u011f\u0131z.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/azure-OCR-gokhan-gokalp.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-4050 size-full lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/azure-OCR-gokhan-gokalp.jpg\" alt=\"\" width=\"621\" height=\"405\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/azure-OCR-gokhan-gokalp.jpg 621w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/azure-OCR-gokhan-gokalp-300x196.jpg 300w\" data-sizes=\"(max-width: 621px) 100vw, 621px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 621px; --smush-placeholder-aspect-ratio: 621\/405;\" \/><\/a><\/p>\n<h2>\u0130htiya\u00e7lar<\/h2>\n<ul>\n<li>Visual Studio Code\n<ul>\n<li>Azure Functions Extension<\/li>\n<\/ul>\n<\/li>\n<li>.NET 6<\/li>\n<li>Azure Cosmos DB (SQL)<\/li>\n<li>Azure Storage Account<\/li>\n<\/ul>\n<h2>Azure Function ile Ba\u015flayal\u0131m<\/h2>\n<p><em>Azure Functions<\/em>, domain spesifik business ihtiya\u00e7lar\u0131m\u0131z i\u00e7in geli\u015ftirecek oldu\u011fumuz <strong>fonksiyonel<\/strong> \u00e7\u00f6z\u00fcmleri, <strong>serverless<\/strong> bir ortamda \u00e7al\u0131\u015ft\u0131rabilmemizi sa\u011flayan bir cloud hizmetidir. B\u00f6ylece server\/infrastructure gibi i\u015flemleri d\u00fc\u015f\u00fcnmekten ziyade geli\u015ftirmek istedi\u011fimiz business fonksiyonelitesine odaklanabilmemizi sa\u011flayarak, daha h\u0131zl\u0131 \u00e7\u00f6z\u00fcmler \u00fcretebilmemizi ve teslim edebilmemizi kolayla\u015ft\u0131rmaktad\u0131r.<\/p>\n<p>\u00d6ncelikle <em>Visual Studio Code<\/em> \u00fczerinden <em>Azure Functions<\/em> extension&#8217;\u0131n\u0131 kullanarak <em><strong>.NET 6<\/strong><\/em> ve <em><strong>Azure<\/strong><\/em> <strong><em>Functions<\/em><\/strong> <em><strong>v4 <\/strong><\/em>runtime&#8217;\u0131na sahip &#8220;<em>UploadADocument<\/em>&#8221; isimli bir <em>HTTP Trigger<\/em> <em>Azure Function<\/em>&#8216;\u0131 olu\u015ftural\u0131m. &#8220;<em>Authorization level<\/em>&#8221; se\u00e7ene\u011fini ise, \u00f6rne\u011fi kolay ger\u00e7ekle\u015ftirebilmek ad\u0131na &#8220;<em>Anonymous<\/em>&#8221; olarak se\u00e7elim.<\/p>\n<blockquote><p><em><strong>NOT<\/strong><\/em>: Production ortamlar\u0131 i\u00e7in ise bir g\u00fcvenlik mekanizmas\u0131na sahip olabilmek ad\u0131na, function-specific <em>API<\/em> key kullanmam\u0131z faydam\u0131za olacakt\u0131r.<\/p><\/blockquote>\n<p>Function olu\u015fturulduktan sonra ise, &#8220;<em>UploadADocument<\/em>&#8221; isimli class&#8217;\u0131 a\u015fa\u011f\u0131daki gibi d\u00fczenleyelim.<\/p>\n<pre>using System.Threading.Tasks;\r\nusing Microsoft.AspNetCore.Mvc;\r\nusing Microsoft.Azure.WebJobs;\r\nusing Microsoft.Azure.WebJobs.Extensions.Http;\r\nusing Microsoft.AspNetCore.Http;\r\nusing Microsoft.Extensions.Logging;\r\nusing Microsoft.Extensions.Configuration;\r\nusing Microsoft.WindowsAzure.Storage;\r\nusing Microsoft.WindowsAzure.Storage.Blob;\r\n\r\nnamespace Documents.Funcs\r\n{\r\n    public static class UploadADocument\r\n    {\r\n        private const string StorageConnectionString = \"AZURE_STORAGE_CONNECTION_STRING\";\r\n        private const string DocumentsBaseFolder = \"documents\";\r\n\r\n        [FunctionName(\"UploadADocument\")]\r\n        public static async Task&lt;IActionResult&gt; Run(\r\n            [HttpTrigger(AuthorizationLevel.Anonymous, \"post\", Route = null)] HttpRequest req,\r\n            ILogger log, ExecutionContext context)\r\n        {\r\n            IFormCollection data = await req.ReadFormAsync();\r\n            var file = data.Files.GetFile(\"file\");\r\n\r\n            if (file == null)\r\n            {\r\n                return new BadRequestObjectResult(\"A file should be uploaded.\");\r\n            }\r\n\r\n            CloudBlobContainer cloudBlobContainer = await GetCloudBlobContainer(context, log);\r\n\r\n            if (cloudBlobContainer == null)\r\n            {\r\n                return new BadRequestObjectResult(\"An error occurred while processing your request.\");\r\n            }\r\n\r\n            CloudBlockBlob blob = cloudBlobContainer.GetBlockBlobReference(file.FileName);\r\n\r\n            await blob.UploadFromStreamAsync(file.OpenReadStream());\r\n\r\n            return new OkResult();\r\n        }\r\n\r\n        private static async Task&lt;CloudBlobContainer&gt; GetCloudBlobContainer(ExecutionContext context, ILogger log)\r\n        {\r\n            try\r\n            {\r\n                CloudStorageAccount cloudStorageAccount = CloudStorageAccount.Parse(GetConfiguration(context)[StorageConnectionString]);\r\n                CloudBlobClient cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();\r\n                CloudBlobContainer cloudBlobContainer = cloudBlobClient.GetContainerReference(DocumentsBaseFolder);\r\n\r\n                await cloudBlobContainer.CreateIfNotExistsAsync();\r\n\r\n                return cloudBlobContainer;\r\n            }\r\n            catch (System.Exception ex)\r\n            {\r\n                log.LogError(ex, ex.Message);\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        public static IConfigurationRoot GetConfiguration(ExecutionContext context)\r\n        {\r\n            var config = new ConfigurationBuilder()\r\n                .SetBasePath(context.FunctionAppDirectory)\r\n                .AddJsonFile(\"local.settings.json\", optional: true, reloadOnChange: true)\r\n                .AddEnvironmentVariables()\r\n                .Build();\r\n\r\n            return config;\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>Bu function i\u00e7erisinde basit olarak upload edilmek istenen dok\u00fcman&#8217;\u0131n, <em>Azure Blob Storage<\/em> \u00fczerinde &#8220;<em>documents<\/em>&#8221; isimli bir container i\u00e7erisine upload i\u015flemini ger\u00e7ekle\u015ftiriyoruz. Ayr\u0131ca dok\u00fcman&#8217;\u0131n id bilgisinin ise, dosya ad\u0131 olarak g\u00f6nderildi\u011fini de varsayal\u0131m.<\/p>\n<p>Local ortamda test i\u015flemlerini ger\u00e7ekle\u015ftirebilmek i\u00e7in ise, &#8220;<em>local.settings.json<\/em>&#8221; dosyas\u0131 i\u00e7erisine a\u015fa\u011f\u0131daki gibi <em>Azure Storage Account&#8217;<\/em>un connection string bilgisini ekleyip, projeyi run etmemiz yeterli olacakt\u0131r.<\/p>\n<pre>{\r\n  \"IsEncrypted\": false,\r\n  \"Values\": {\r\n    \"AzureWebJobsStorage\": \"\",\r\n    \"FUNCTIONS_WORKER_RUNTIME\": \"dotnet\",\r\n    \"AZURE_STORAGE_CONNECTION_STRING\": \"DefaultEndpointsProtocol=https;AccountName=YOUR_ACCOUNT_NAME;AccountKey=YOUR_ACCOUNT_KEY;EndpointSuffix=core.windows.net\"\r\n  }\r\n}\r\n\r\n<\/pre>\n<blockquote><p><strong><em>NOT<\/em><\/strong>: <em>Azure Storage Account<\/em> connection string bilgisini ise, <em>Azure Portal<\/em> \u00fczerinden ilgili storage account&#8217;un &#8220;<em>Access keys<\/em>&#8221; sekmesine girerek ula\u015fabilirsiniz.<\/p><\/blockquote>\n<p>\u015eimdi olu\u015fturmu\u015f oldu\u011fumuz bu function&#8217;\u0131n, <em>Visual Studio Code<\/em> kullanarak deployment i\u015flemlerini ger\u00e7ekle\u015ftirelim.<\/p>\n<p>Bunun i\u00e7in <em>Visual Studio Code<\/em> \u00fczerinden <em>Azure Functions<\/em> extension&#8217;\u0131na ge\u00e7elim ve ard\u0131ndan &#8220;<em>Functions<\/em>&#8221; ba\u015fl\u0131\u011f\u0131 alt\u0131ndaki &#8220;<em>Deploy to Function App&#8230;<\/em>&#8221; butonuna t\u0131klayal\u0131m. Ard\u0131ndan kar\u015f\u0131m\u0131za gelecek olan ad\u0131mlar\u0131 takip etmemiz yeterli olacakt\u0131r. Ad\u0131mlar\u0131 takip ederken &#8220;<em>Select a runtime stack<\/em>&#8221; se\u00e7ene\u011finde ise &#8220;<em>.NET 6<\/em>&#8221; ve &#8220;<em>Functions v4<\/em>&#8221; se\u00e7eneklerini se\u00e7ti\u011fimizden emin olal\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/02\/create-function-runtime-stack.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-3997 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/02\/create-function-runtime-stack.jpg\" alt=\"\" width=\"2306\" height=\"306\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-function-runtime-stack.jpg 2306w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-function-runtime-stack-300x40.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-function-runtime-stack-1024x136.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-function-runtime-stack-768x102.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-function-runtime-stack-1536x204.jpg 1536w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-function-runtime-stack-2048x272.jpg 2048w\" data-sizes=\"(max-width: 2306px) 100vw, 2306px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 2306px; --smush-placeholder-aspect-ratio: 2306\/306;\" \/><\/a><\/p>\n<p>Bu deployment i\u015flemi sonucunda ise <em>OS<\/em> sistemi &#8220;<em>Windows<\/em>&#8220;, hosting plan type&#8217;\u0131 olarak ise &#8220;<em>Consumption<\/em>&#8221; olan bir function olu\u015fturulacakt\u0131r. Dilersek farkl\u0131 ihtiya\u00e7lar\u0131m\u0131za g\u00f6re se\u00e7ebilece\u011fimiz &#8220;<em>Premium<\/em>&#8221; ve &#8220;<em>Dedicated<\/em>&#8221; olmak \u00fczere 2 farkl\u0131 hosting plan\u0131 daha bulunmaktad\u0131r.<\/p>\n<p>\u00d6rne\u011fimiz gere\u011fi dok\u00fcman domain&#8217;inin \u00e7ok fazla y\u00fck&#8217;e ve s\u0131k kullan\u0131ma sahip olmayaca\u011f\u0131n\u0131 varsayarsak, &#8220;<em>Consumption<\/em>&#8221; hosting plan&#8217;\u0131n\u0131n sunmu\u015f oldu\u011fu <strong>auto scaling<\/strong> ve <strong>kulland\u0131\u011f\u0131n kadar \u00f6de<\/strong> modeli gayet ihtiyac\u0131m\u0131za y\u00f6nelik yeterli olacakt\u0131r. Hosting plan&#8217;lar\u0131n\u0131n detaylar\u0131na ise, <em><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-scale\" target=\"_blank\" rel=\"noopener\">buradan<\/a><\/em> ula\u015fabilirsiniz.<\/p>\n<p>Deployment i\u015flemi tamamland\u0131ktan sonra ise \u015fimdi <em>Azure Storage Account<\/em>&#8216;un connection string bilgisini, uygulama runtime&#8217;\u0131 i\u00e7in eklememiz gerekmektedir.<\/p>\n<p>Bunun i\u00e7in <em>Azure Portal<\/em> \u00fczerinden olu\u015fturulan function app&#8217;in &#8220;<em>Configuration<\/em>&#8221; sekmesine girelim ve &#8220;<em>AZURE_STORAGE_CONNECTION_STRING<\/em>&#8221; bilgisini burada environment variable olarak a\u015fa\u011f\u0131daki gibi tan\u0131mlayal\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/02\/add-application-setting.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-3998 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/02\/add-application-setting.jpg\" alt=\"\" width=\"2188\" height=\"936\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/add-application-setting.jpg 2188w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/add-application-setting-300x128.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/add-application-setting-1024x438.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/add-application-setting-768x329.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/add-application-setting-1536x657.jpg 1536w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/add-application-setting-2048x876.jpg 2048w\" data-sizes=\"(max-width: 2188px) 100vw, 2188px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 2188px; --smush-placeholder-aspect-ratio: 2188\/936;\" \/><\/a><\/p>\n<p>Art\u0131k business ihtiyac\u0131m\u0131za y\u00f6nelik function, haz\u0131r ve \u00e7al\u0131\u015f\u0131r durumda.<\/p>\n<p>Deploy etti\u011fimiz function&#8217;\u0131n <em>URL<\/em> adresine eri\u015febilmek i\u00e7in ise, yine portal \u00fczerinden function app&#8217;in &#8220;<em>Functions<\/em>&#8221; sekmesi alt\u0131ndan function&#8217;\u0131n detay sayfas\u0131na eri\u015ferek, a\u015fa\u011f\u0131daki gibi &#8220;<em>Get Function Url<\/em>&#8221; butonuna t\u0131klamam\u0131z yeterli olacakt\u0131r.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/02\/get-function-url.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4000 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/02\/get-function-url.jpg\" alt=\"\" width=\"2132\" height=\"534\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/get-function-url.jpg 2132w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/get-function-url-300x75.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/get-function-url-1024x256.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/get-function-url-768x192.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/get-function-url-1536x385.jpg 1536w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/get-function-url-2048x513.jpg 2048w\" data-sizes=\"(max-width: 2132px) 100vw, 2132px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 2132px; --smush-placeholder-aspect-ratio: 2132\/534;\" \/><\/a><\/p>\n<p>G\u00f6rd\u00fc\u011f\u00fcm\u00fcz gibi serverless yakla\u015f\u0131m\u0131 teknik a\u00e7\u0131dan bizi herhangi bir hosting\/infra gibi i\u015flemler ile u\u011fra\u015ft\u0131rmadan, do\u011frudan business problemimize y\u00f6nelik fonksiyonel \u00e7\u00f6z\u00fcme odaklanabilmemize olanak sa\u011flam\u0131\u015ft\u0131r. Bu \u015fekilde h\u0131zl\u0131 \u00e7\u00f6z\u00fcmler ve teslimat&#8217;lar ger\u00e7ekle\u015ftirebilmek ve ayr\u0131ca serverless kulland\u0131k\u00e7a \u00f6de modeli sayesinde de operasyonel maliyetlerin azalt\u0131labilmesi m\u00fcmk\u00fcn olabilmektedir.<\/p>\n<h2>Azure Computer Vision API ile OCR<\/h2>\n<p>Dok\u00fcmanlar\u0131n dijitalle\u015ftirilmesindeki \u00f6nemin artmas\u0131 ile beraber, g\u00fcn\u00fcm\u00fczde kullanabilece\u011fimiz farkl\u0131 <em>OCR <\/em>\u00e7\u00f6z\u00fcmleri de markette yer almaktad\u0131r. Dilersek open-source olan <em>Tesseract OCR<\/em>&#8216;\u0131 kullanabilir<em>, <\/em>dilersek de commercial olan <em>ABBYY<\/em> veya <em>Azure Computer Vision<\/em> gibi cloud \u00e7\u00f6z\u00fcmlerine y\u00f6nelebiliriz. Ben bu makale kapsam\u0131nda ise <em>Azure<\/em> taraf\u0131ndan fully managed <em>OCR <\/em>\u00e7\u00f6z\u00fcm\u00fc olarak sunulan,<em><strong>\u00a0Computer Vision<\/strong><\/em><em>\u00a0<strong>Read API<\/strong><\/em><strong>&#8216;<\/strong>\u0131n\u0131 kullanaca\u011f\u0131m.<\/p>\n<p>Geli\u015fmi\u015f bir recognition model&#8217;ine sahip olan <em>Read API<\/em>, dok\u00fcmanlar \u00fczerindeki metinleri &#8220;164&#8221; farkl\u0131 dil&#8217;e kadar dijital bir hale getirebilmektedir (02.2022 latest preview version). Ayr\u0131ca &#8220;9&#8221; dil&#8217;e kadar da el yaz\u0131s\u0131 olan metin&#8217;leri ayr\u0131\u015ft\u0131rabilmektedir. Bana g\u00f6re en g\u00fczel taraf\u0131 ise, herhangi bir machine learning uzmanl\u0131\u011f\u0131 gerektirmemesidir.<\/p>\n<p>Destekledi\u011fi dok\u00fcman formatlar\u0131 aras\u0131nda <em>JPEG<\/em>, <em>PNG<\/em>, <em>BMP<\/em>, <em>PDF<\/em>, ve <em>TIFF<\/em> bulunmaktad\u0131r. Ayr\u0131ca <em>PDF<\/em> ve <em>TIFF<\/em> dok\u00fcmanlar\u0131 i\u00e7in ise, &#8220;2000&#8221; sayfaya kadar bir destek sunmaktad\u0131r.<\/p>\n<p>Sevdi\u011fim \u00f6zelliklerinden birisi ise <em>OCR<\/em> i\u015flemi s\u0131ras\u0131nda herhangi bir dil belirtmemize gerek olmamas\u0131d\u0131r. Bu sayede dok\u00fcman i\u00e7erisinde bulunan birden \u00e7ok dili de destekleyebilmektedir. Bir di\u011fer g\u00fczel \u00f6zelli\u011fi ise dok\u00fcman \u00fczerinde buldu\u011fu metinleri, <strong>koordinatlar\u0131<\/strong> ve &#8220;0&#8221; ile &#8220;100&#8221; aras\u0131nda bir <strong>g\u00fcven puan\u0131<\/strong> ile birlikte bizlere sunabilmesidir. Bu g\u00fcven puan\u0131 ile birlikte ise senaryolara g\u00f6re kendi farkl\u0131 stratejilerimizi belirleyerek, daha iyi sonu\u00e7lar elde edebilmeyi sa\u011flayabiliriz. \u00d6rne\u011fin g\u00fcven puan\u0131 istedi\u011fimiz bir seviyenin alt\u0131nda ise, ilgili dok\u00fcman&#8217;\u0131 manuel bir i\u015flem gerektiren bir s\u00fcrece de sokabiliriz.<\/p>\n<p>K\u0131sa bir \u00f6n bilgiden sonra, art\u0131k uygulamaya ge\u00e7ebiliriz.<\/p>\n<p>\u00d6ncelikle <em>Azure Portal<\/em> \u00fczerinden a\u015fa\u011f\u0131daki gibi bir <em>Computer Vision<\/em> kayna\u011f\u0131 olu\u015ftural\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/02\/create-cv-1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4006 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/02\/create-cv-1.jpg\" alt=\"\" width=\"1588\" height=\"1334\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-cv-1.jpg 1588w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-cv-1-300x252.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-cv-1-1024x860.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-cv-1-768x645.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/create-cv-1-1536x1290.jpg 1536w\" data-sizes=\"(max-width: 1588px) 100vw, 1588px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1588px; --smush-placeholder-aspect-ratio: 1588\/1334;\" \/><\/a><\/p>\n<p>Ben bu kayna\u011f\u0131 &#8220;<em>DocumentOcrCV<\/em>&#8221; ad\u0131yla olu\u015fturdum. Olu\u015fturma i\u015fleminden sonra bu kayna\u011f\u0131n detay sayfas\u0131na gidelim ve &#8220;<em>Keys and Endpoint<\/em>&#8221; sekmesine ge\u00e7elim. Burada bulunan &#8220;<em>Key<\/em>&#8221; ve &#8220;<em>Endpoint<\/em>&#8221; bilgilerini ise, ilerleyen a\u015famalarda kullanabilmek \u00fczere bir kenar\u0131ya not edelim.<\/p>\n<h2>Logic Apps ile bir OCR Workflow&#8217;u Olu\u015ftural\u0131m<\/h2>\n<p><em>OCR<\/em> s\u00fcre\u00e7lerini otomatikle\u015ftirebilmek i\u00e7in <em>Azure Logic Apps<\/em>&#8216;den yararlanaca\u011f\u0131m\u0131z\u0131 s\u00f6ylemi\u015ftik. <em>Logic Apps<\/em> i\u00e7in \u00e7e\u015fitli <strong>entegrasyon<\/strong> se\u00e7enekleri ile bize <strong>kolay <\/strong>ve\u00a0<strong>highly scalable serverless<\/strong>\u00a0<strong>workflow&#8217;lar<\/strong> olu\u015fturabilmemize olanak sa\u011flayan geli\u015fmi\u015f bir cloud hizmetidir diyebiliriz.<\/p>\n<p>\u015eimdi ilk olarak <em>Azure Portal<\/em> \u00fczerinden a\u015fa\u011f\u0131daki gibi\u00a0bir <em>Logic App<\/em>\u00a0kayna\u011f\u0131 olu\u015ftural\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/02\/logic-app-create-1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4011 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/02\/logic-app-create-1.jpg\" alt=\"\" width=\"1480\" height=\"1224\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/logic-app-create-1.jpg 1480w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/logic-app-create-1-300x248.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/logic-app-create-1-1024x847.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/02\/logic-app-create-1-768x635.jpg 768w\" data-sizes=\"(max-width: 1480px) 100vw, 1480px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1480px; --smush-placeholder-aspect-ratio: 1480\/1224;\" \/><\/a><\/p>\n<p>Olu\u015fturma i\u015flemi tamamland\u0131\u011f\u0131nda ise olu\u015fturulan kayna\u011fa gidelim ve workflow&#8217;u olu\u015fturmaya ba\u015flayabilmek i\u00e7in, &#8220;<em>Logic app designer<\/em>&#8221; sekmesine ge\u00e7elim. Ard\u0131ndan templates b\u00f6l\u00fcm\u00fcnden &#8220;<em>Blank Logic App<\/em>&#8221; se\u00e7ene\u011fini se\u00e7elim.<\/p>\n<p><em>Logic Apps<\/em> ile bir workflow olu\u015ftururken en \u00f6nemli yap\u0131 ta\u015flar\u0131ndan birisi, <strong>trigger&#8217;<\/strong>lar d\u0131r. Trigger&#8217;\u0131 bir ba\u015flang\u0131\u00e7 noktas\u0131 olarak da d\u00fc\u015f\u00fcnebiliriz. <em>Logic Apps<\/em> i\u00e7erisinde \u00e7e\u015fitli <em>API<\/em>&#8216;lar taraf\u0131ndan sunulan farkl\u0131 trigger&#8217;lar bulunmaktad\u0131r. Birde trigger&#8217;lar devreye girdi\u011finde tan\u0131mlanan business i\u015flemlerini ger\u00e7ekle\u015ftiren <b>action<\/b>&#8216;lar.<\/p>\n<p>\u00d6rnek senaryomuza g\u00f6re dok\u00fcmanlar\u0131, olu\u015fturmu\u015f oldu\u011fumuz <em>Azure Function<\/em> arac\u0131l\u0131\u011f\u0131 ile <em>Azure Blob Storage<\/em> \u00fczerinde &#8220;<em>documents<\/em>&#8221; isimli bir container&#8217;a upload edece\u011fiz. Yani workflow&#8217;un ba\u015flang\u0131\u00e7 noktas\u0131 olarak, <em>Azure Blob Storage<\/em>&#8216;\u0131n trigger&#8217;\u0131n\u0131 kullanabiliriz.<\/p>\n<p>\u015eimdi designer \u00fczerinden &#8220;<em>Search connectors<\/em>&#8221; arama kutusuna gelelim ve &#8220;<em>Azure Blob Storage<\/em>&#8221; yazal\u0131m. Gelen sonu\u00e7lardan connector olarak &#8220;<em>Azure Blob Storage<\/em>&#8221; \u0131, trigger olarak ise &#8220;<em>When a blob is added or modified (properties only) (V2)<\/em>&#8221; se\u00e7ene\u011fini se\u00e7elim.<\/p>\n<p>\u015eimdi a\u00e7\u0131lacak olan pencereden a\u015fa\u011f\u0131daki gibi ilgili storage account&#8217;un credential bilgilerini sa\u011flamam\u0131z gerekmektedir.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/blob-trigger-1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4013 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/blob-trigger-1.jpg\" alt=\"\" width=\"1262\" height=\"734\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/blob-trigger-1.jpg 1262w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/blob-trigger-1-300x174.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/blob-trigger-1-1024x596.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/blob-trigger-1-768x447.jpg 768w\" data-sizes=\"(max-width: 1262px) 100vw, 1262px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1262px; --smush-placeholder-aspect-ratio: 1262\/734;\" \/><\/a><\/p>\n<p>Ard\u0131ndan trigger&#8217;\u0131 a\u015fa\u011f\u0131daki gibi olu\u015ftural\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/create-logic-trigger.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4015 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/create-logic-trigger.jpg\" alt=\"\" width=\"1268\" height=\"790\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/create-logic-trigger.jpg 1268w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/create-logic-trigger-300x187.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/create-logic-trigger-1024x638.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/create-logic-trigger-768x478.jpg 768w\" data-sizes=\"(max-width: 1268px) 100vw, 1268px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1268px; --smush-placeholder-aspect-ratio: 1268\/790;\" \/><\/a><\/p>\n<p>B\u00f6ylece &#8220;<em>documents<\/em>&#8221; container&#8217;\u0131 i\u00e7erisine yeni bir dok\u00fcman upload edildi\u011finde, workflow trigger olacak ve birazdan tan\u0131mlayaca\u011f\u0131m\u0131z t\u00fcm ad\u0131mlar\u0131 s\u0131ras\u0131yla ger\u00e7ekle\u015ftirecektir.<\/p>\n<p>\u015eimdi ilerleyen a\u015famalarda kullanabilmek \u00fczere upload edilen dok\u00fcman&#8217;\u0131n bilgilerine eri\u015febilece\u011fimiz yeni bir ad\u0131m tan\u0131mlayal\u0131m. Bunun i\u00e7in yine arama kutusuna &#8220;<em>Azure Blob Storage<\/em>&#8221; yazal\u0131m ve bu sefer &#8220;<em>Get blob content (V2)<\/em>&#8221; action&#8217;\u0131n\u0131 se\u00e7elim.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/get-blob-content-dynamic-gokhan-gokalp.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4018 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/get-blob-content-dynamic-gokhan-gokalp.jpg\" alt=\"\" width=\"1858\" height=\"930\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/get-blob-content-dynamic-gokhan-gokalp.jpg 1858w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/get-blob-content-dynamic-gokhan-gokalp-300x150.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/get-blob-content-dynamic-gokhan-gokalp-1024x513.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/get-blob-content-dynamic-gokhan-gokalp-768x384.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/get-blob-content-dynamic-gokhan-gokalp-1536x769.jpg 1536w\" data-sizes=\"(max-width: 1858px) 100vw, 1858px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1858px; --smush-placeholder-aspect-ratio: 1858\/930;\" \/><\/a><\/p>\n<p>Bu action i\u00e7erisinde ise bilgilerine eri\u015fmek istedi\u011fimiz dok\u00fcman&#8217;\u0131n path&#8217;ini belirtiyoruz. Path&#8217;i belirtebilmek i\u00e7in ise, bir \u00f6nceki trigger&#8217;a ait olan &#8220;<em>List of Files Name<\/em>&#8221; dynamic content&#8217;inden yararlan\u0131yoruz. Expression olarak ise, &#8220;<em>triggerBody()?[&#8216;Name&#8217;]<\/em>&#8221; \u015feklinde de kullanabilirdik. Art\u0131k ilgili dok\u00fcman&#8217;\u0131n bilgilerine eri\u015febilece\u011fimiz bir ad\u0131m mevcut.<\/p>\n<p>Dok\u00fcman&#8217;\u0131n id bilgisinin dosya ad\u0131 olarak g\u00f6nderilece\u011fini s\u00f6ylemi\u015ftik. Bu ad\u0131mdan sonra ilgili dok\u00fcman&#8217;\u0131n bilgilerine eri\u015febilece\u011fimiz i\u00e7in, dok\u00fcman&#8217;\u0131n id bilgisini explicit bir \u015fekilde workflow \u00fczerinde tutabilece\u011fimiz bir variable olu\u015ftural\u0131m. Bunun i\u00e7in yeni ad\u0131m ekle butonuna t\u0131klayal\u0131m ve &#8220;<em>Variables<\/em>&#8221; \u0131 arayal\u0131m. Ard\u0131ndan action olarak &#8220;<em>Initialize variable<\/em>&#8221; \u0131 se\u00e7elim ve &#8220;<em>DocumentID<\/em>&#8221; ad\u0131nda bir variable olu\u015ftural\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/new-variable-logic-app.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4019 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/new-variable-logic-app.jpg\" alt=\"\" width=\"2076\" height=\"818\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/new-variable-logic-app.jpg 2076w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/new-variable-logic-app-300x118.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/new-variable-logic-app-1024x403.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/new-variable-logic-app-768x303.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/new-variable-logic-app-1536x605.jpg 1536w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/new-variable-logic-app-2048x807.jpg 2048w\" data-sizes=\"(max-width: 2076px) 100vw, 2076px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 2076px; --smush-placeholder-aspect-ratio: 2076\/818;\" \/><\/a><\/p>\n<p>Variable&#8217;\u0131n de\u011fer k\u0131sm\u0131na ise &#8220;<em>split(triggerBody()?[&#8216;Name&#8217;],&#8217;.&#8217;)[0]<\/em>&#8221; \u015feklinde bir expression yazal\u0131m. Bu basit split expression&#8217;\u0131 ile dok\u00fcman&#8217;\u0131n id bilgisini, dosya ad\u0131\u00a0\u00fczerinden elde etmi\u015f olaca\u011f\u0131z.<\/p>\n<p>Art\u0131k <em>OCR<\/em> i\u015flemleri i\u00e7in gerekli workflow ad\u0131mlar\u0131n\u0131 tan\u0131mlamaya ba\u015flayabiliriz.<\/p>\n<p>\u00d6ncelikle<em> Computer Vision<\/em> kayna\u011f\u0131n\u0131n &#8220;<em>key<\/em>&#8221; ve &#8220;<em>endpoint<\/em>&#8221; bilgilerini, workflow \u00fczerinde &#8220;<em>Parameters<\/em>&#8221; butonuna basarak a\u015fa\u011f\u0131daki gibi birer parametre olarak tan\u0131mlayal\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/parameters-cv.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4020 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/parameters-cv.jpg\" alt=\"\" width=\"1214\" height=\"966\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/parameters-cv.jpg 1214w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/parameters-cv-300x239.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/parameters-cv-1024x815.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/parameters-cv-768x611.jpg 768w\" data-sizes=\"(max-width: 1214px) 100vw, 1214px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1214px; --smush-placeholder-aspect-ratio: 1214\/966;\" \/><\/a><\/p>\n<p>&#8220;<em>ComputerVisionAPIReadEndpoint<\/em>&#8221; parametresinin de\u011feri olarak ise, &#8220;<em>https:\/\/{endpoint}\/vision\/v3.2\/read\/analyze<\/em>&#8221; endpoint&#8217;ini kullanal\u0131m.<\/p>\n<p>\u015eimdi ise <em>Blob Storage<\/em> \u00fczerine y\u00fcklenecek olan dok\u00fcman&#8217;\u0131n <em>Computer Vision<\/em> taraf\u0131ndan eri\u015filebilir olabilmesi i\u00e7in, ilgili dok\u00fcman&#8217;a \u00f6zel bir <em>SAS<\/em> link&#8217;i olu\u015fturaca\u011f\u0131z. Elbette ilgili <em>Blob Storage<\/em> account&#8217;unuz public olarak eri\u015fime a\u00e7\u0131k de\u011filse.<\/p>\n<p>Bu i\u015flem i\u00e7in &#8220;<em>Create SAS URI by path (V2)<\/em>&#8221; action&#8217;\u0131n\u0131 a\u015fa\u011f\u0131daki gibi workflow&#8217;a dahil edelim.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/create-sas-blob.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4021 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/create-sas-blob.jpg\" alt=\"\" width=\"1262\" height=\"1206\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/create-sas-blob.jpg 1262w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/create-sas-blob-300x287.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/create-sas-blob-1024x979.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/create-sas-blob-768x734.jpg 768w\" data-sizes=\"(max-width: 1262px) 100vw, 1262px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1262px; --smush-placeholder-aspect-ratio: 1262\/1206;\" \/><\/a><\/p>\n<p>&#8220;<em>Blob path<\/em>&#8221; i olarak ise &#8220;<em>List of Files Path<\/em>&#8221; dynamic content&#8217;ini kullanal\u0131m. B\u00f6ylece ilgili dok\u00fcman i\u00e7in bir <em>SAS <\/em>link&#8217;i olu\u015fturulmu\u015f olacak.<\/p>\n<p>\u015eimdi ilgili dok\u00fcman&#8217;\u0131n <em>OCR<\/em> i\u015flemlerini ba\u015flatabilmek i\u00e7in, a\u015fa\u011f\u0131daki gibi\u00a0bir <em>HTTP<\/em> action ekleyelim. Bu action&#8217;\u0131 ise, &#8220;<em>ComputerVisionAPIReadEndpoint<\/em>&#8221; olarak adland\u0131ral\u0131m. B\u00f6ylece ilerleyen ad\u0131mlarda bu action&#8217;\u0131n output&#8217;una kolay bir \u015fekilde eri\u015fim sa\u011flayabiliriz.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/http-action-logic-app.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4023 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/http-action-logic-app.jpg\" alt=\"\" width=\"1268\" height=\"1504\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/http-action-logic-app.jpg 1268w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/http-action-logic-app-253x300.jpg 253w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/http-action-logic-app-863x1024.jpg 863w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/http-action-logic-app-768x911.jpg 768w\" data-sizes=\"(max-width: 1268px) 100vw, 1268px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1268px; --smush-placeholder-aspect-ratio: 1268\/1504;\" \/><\/a><\/p>\n<p>Bu action ile basit bir \u015fekilde ilgili\u00a0dok\u00fcman&#8217;\u0131n <em>URL<\/em> bilgisini, <em>Read API<\/em>&#8216;a g\u00f6nderece\u011fiz. Ayr\u0131ca <em>Read API<\/em>, &#8220;<em>octet-stream<\/em>&#8221; format\u0131nda binary data da kabul etmektedir. &#8220;<em>URI<\/em>&#8221; bilgisi i\u00e7in ise, &#8220;<em>ComputerVisionAPIReadEndpoint<\/em>&#8221; parametresini kullanal\u0131m.Bunlara ek olarak, &#8220;<em>pages<\/em>&#8221; request parametresini de kullanarak \u00e7oklu sayfal\u0131 <em>PDF<\/em> ve <em>TIFF<\/em> dok\u00fcmanlar\u0131 i\u00e7in, sayfa se\u00e7im i\u015flemleri ger\u00e7ekle\u015ftirebilmekteyiz. \u00d6rne\u011fin: &#8220;<em>?pages=1,2,3<\/em>&#8221; veya &#8220;<em>?pages=1-3<\/em>&#8221;<\/p>\n<p>Bir di\u011fer \u00f6nemli nokta ise<em> Computer Vision API<\/em> key bilgisi. Bu bilgiyi ise &#8220;<em>Ocp-Apim-Subscription-Key<\/em>&#8221; header parametresi ile g\u00f6nderece\u011fiz.<\/p>\n<p>Body i\u00e7erisinde ise ilgili dok\u00fcman&#8217;\u0131n <em>URL<\/em> bilgisini, bir \u00f6nceki a\u015famada ilgili dok\u00fcman i\u00e7in \u00fcretmi\u015f oldu\u011fumuz <em>SAS <\/em>link&#8217;ini kullanarak belirtiyoruz. \u0130lgili <em>SAS<\/em> link&#8217;ine ise, dynamic content&#8217;ler i\u00e7erisinden &#8220;<em>Create SAS URI by path (V2)<\/em>&#8221; ba\u015fl\u0131\u011f\u0131 alt\u0131ndan eri\u015febiliriz.<\/p>\n<p>Art\u0131k <em>OCR<\/em> i\u015flemlerini ba\u015flatabilmek i\u00e7in gereken <em>HTTP<\/em> request de haz\u0131r durumda. \u015eimdi <em>OCR<\/em> sonu\u00e7lar\u0131na nas\u0131l ula\u015fabilece\u011fimiz k\u0131sm\u0131na ge\u00e7ebiliriz.<\/p>\n<p><em>Computer Vision Read API<\/em>&#8216;\u0131,<em> OCR<\/em> i\u015flemlerini <strong>asynchronous<\/strong> bir \u015fekilde ger\u00e7ekle\u015ftirmektedir. Bu sebeple <em>Read API<\/em>,\u00a0response olarak geriye <em>OCR<\/em> i\u015fleminin detaylar\u0131n\u0131n sorgulanabilece\u011fi <strong><em>Get Read Result<\/em> <\/strong>method&#8217;unun endpoint bilgisini d\u00f6nmektedir. K\u0131sacas\u0131 <em>OCR<\/em> i\u015flemi tamamlanana kadar, belirli aral\u0131klarla <em>Get Read Result <\/em>endpoint&#8217;ini sorgulamam\u0131z gerekmektedir.<\/p>\n<p>\u0130lk olarak workflow \u00fczerinde a\u015fa\u011f\u0131daki gibi &#8220;<em>IsDocumentAnalyzed<\/em>&#8221; ad\u0131nda boolean bir variable tan\u0131mlayal\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/is-document-analyzed.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4024 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/is-document-analyzed.jpg\" alt=\"\" width=\"1236\" height=\"1216\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/is-document-analyzed.jpg 1236w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/is-document-analyzed-300x295.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/is-document-analyzed-1024x1007.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/is-document-analyzed-768x756.jpg 768w\" data-sizes=\"(max-width: 1236px) 100vw, 1236px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1236px; --smush-placeholder-aspect-ratio: 1236\/1216;\" \/><\/a><\/p>\n<p>Bu variable <em>false<\/em> de\u011ferine sahip oldu\u011fu s\u00fcrece, <em>Get Read Result<\/em> endpoint&#8217;ini bir d\u00f6ng\u00fc i\u00e7erisinde sorguluyor olaca\u011f\u0131z.<\/p>\n<p>Workflow i\u00e7erisine bir d\u00f6ng\u00fc ekleyebilmek i\u00e7in arama kutusuna &#8220;<em>Control<\/em>&#8221; yazal\u0131m ve ard\u0131ndan action olarak &#8220;<em>Until<\/em>&#8221; i se\u00e7elim.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/until-step-1-latest.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4028 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/until-step-1-latest.jpg\" alt=\"\" width=\"1232\" height=\"1388\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/until-step-1-latest.jpg 1232w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/until-step-1-latest-266x300.jpg 266w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/until-step-1-latest-909x1024.jpg 909w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/until-step-1-latest-768x865.jpg 768w\" data-sizes=\"(max-width: 1232px) 100vw, 1232px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1232px; --smush-placeholder-aspect-ratio: 1232\/1388;\" \/><\/a><\/p>\n<p>Ben bu d\u00f6ng\u00fc ad\u0131m\u0131n\u0131 &#8220;<em>Check the Document is Analyzed<\/em>&#8221; olarak adland\u0131rd\u0131m. Ko\u015ful olarak ise tan\u0131mlam\u0131\u015f oldu\u011fumuz &#8220;<em>IsDocumentAnalyzed<\/em>&#8221; variable&#8217;\u0131n\u0131n &#8220;<em>true<\/em>&#8221; olmas\u0131n\u0131 belirleyelim. Art\u0131k bu d\u00f6ng\u00fc scope&#8217;u i\u00e7erisinde <em>Get Read Result<\/em> endpoint&#8217;ini sorgulamaya ba\u015flayabiliriz.<\/p>\n<p>\u00d6ncelikle sorgulama i\u015flemlerini belirli zaman aral\u0131klar\u0131 ile ger\u00e7ekle\u015ftirebilmek ad\u0131na, bu d\u00f6ng\u00fc scope&#8217;u\u00a0i\u00e7erisine a\u015fa\u011f\u0131daki gibi bir &#8220;<em>Delay<\/em>&#8221; action&#8217;\u0131 ekleyelim.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/until-delay.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4030 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/until-delay.jpg\" alt=\"\" width=\"1224\" height=\"870\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/until-delay.jpg 1224w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/until-delay-300x213.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/until-delay-1024x728.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/until-delay-768x546.jpg 768w\" data-sizes=\"(max-width: 1224px) 100vw, 1224px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1224px; --smush-placeholder-aspect-ratio: 1224\/870;\" \/><\/a><\/p>\n<p>&#8220;<em>Delay<\/em>&#8221; action&#8217;\u0131n\u0131 tan\u0131mlad\u0131ktan sonra ise, <em>Get Read Result<\/em> endpoint&#8217;ini sorgulayabilmek i\u00e7in yeni bir <em>HTTP<\/em> action ekleyelim. Bu action&#8217;\u0131 ise &#8220;<em>ComputerVisionAPIGetReadResultEndpoint<\/em>&#8221; olarak adland\u0131ral\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/read-result-end.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4031 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/read-result-end.jpg\" alt=\"\" width=\"1236\" height=\"1144\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/read-result-end.jpg 1236w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/read-result-end-300x278.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/read-result-end-1024x948.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/read-result-end-768x711.jpg 768w\" data-sizes=\"(max-width: 1236px) 100vw, 1236px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1236px; --smush-placeholder-aspect-ratio: 1236\/1144;\" \/><\/a><\/p>\n<p>&#8220;<em>Method<\/em>&#8221; olarak &#8220;<em>GET<\/em>&#8221; i, &#8220;<em>URI<\/em>&#8221; adresi olarak ise daha \u00f6nce de bahsetti\u011fimiz gibi <em>Get Read Result<\/em> endpoint&#8217;ini kullanal\u0131m. Bu endpoint bilgisine ise, eklemi\u015f oldu\u011fumuz &#8220;<em>ComputerVisionAPIReadEndpoint<\/em>&#8221; <em>HTTP<\/em> action ad\u0131m\u0131n\u0131n &#8220;<em>Operation-Location<\/em>&#8221; adl\u0131 response header parametresi \u00fczerinden eri\u015fim sa\u011flayaca\u011f\u0131z.<\/p>\n<p>Bunun i\u00e7in a\u015fa\u011f\u0131daki gibi bir expression yazmam\u0131z yeterli olacakt\u0131r.<\/p>\n<pre>outputs('ComputerVisionAPIReadEndpoint')['headers']['Operation-Location']<\/pre>\n<p>Ayr\u0131ca <em>Computer Vision API<\/em> key bilgisini de, yine &#8220;<em>Ocp-Apim-Subscription-Key<\/em>&#8221; header parametresi \u00fczerinden g\u00f6nderiyor olaca\u011f\u0131z.<\/p>\n<p>Art\u0131k <em>OCR<\/em> i\u015fleminin sonu\u00e7lar\u0131n\u0131 sorgulayabilece\u011fimiz <em>HTTP<\/em> request ad\u0131m\u0131 da haz\u0131r durumda. \u015eimdi ise geriye bu request&#8217;in response sonucunu kontrol etmek ve <em>OCR<\/em> sonu\u00e7lar\u0131n\u0131 <em>Cosmos DB<\/em> \u00fczerine kaydetmek kald\u0131.<\/p>\n<p>Bu ad\u0131mlar\u0131 ger\u00e7ekle\u015ftirebilmek i\u00e7in ise yine ayn\u0131 &#8220;<em>Check the Document is Analyzed<\/em>&#8221; d\u00f6ng\u00fc scope&#8217;u i\u00e7erisine yeni bir ko\u015ful ad\u0131m\u0131 eklememiz gerekmektedir. Bunun i\u00e7in arama kutusuna &#8220;<em>Control<\/em>&#8221; yazal\u0131m ve bu sefer action olarak &#8220;<em>Condition<\/em>&#8221; \u0131 se\u00e7elim.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/workflow-condition-1.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4040 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/workflow-condition-1.jpg\" alt=\"\" width=\"1304\" height=\"1156\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/workflow-condition-1.jpg 1304w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/workflow-condition-1-300x266.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/workflow-condition-1-1024x908.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/workflow-condition-1-768x681.jpg 768w\" data-sizes=\"(max-width: 1304px) 100vw, 1304px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1304px; --smush-placeholder-aspect-ratio: 1304\/1156;\" \/><\/a><\/p>\n<p>Bu noktada i\u015flemin ba\u015far\u0131yla tamamlan\u0131p tamamlanmad\u0131\u011f\u0131n\u0131 kontrol edebilmek i\u00e7in, <em>Get Read Result<\/em> endpoint&#8217;inin response body&#8217;si i\u00e7erisinde alacak oldu\u011fumuz &#8220;<em>status<\/em>&#8221; property&#8217;sini kontrol etmemiz gerekmektedir. E\u011fer &#8220;<em>succeeded<\/em>&#8221; de\u011ferini al\u0131rsak, <em>OCR<\/em> i\u015flemi ba\u015far\u0131yla tamamlanm\u0131\u015f demektir.<\/p>\n<p>Bu kontrol i\u015flemini ger\u00e7ekle\u015ftirebilmek i\u00e7in, ko\u015ful de\u011feri olarak a\u015fa\u011f\u0131daki gibi bir expression yazal\u0131m.<\/p>\n<div>\n<pre>body('ComputerVisionAPIGetReadResultEndpoint')['status']<\/pre>\n<\/div>\n<p>Ko\u015ful olarak &#8220;<em>is equal to<\/em>&#8221; se\u00e7erek de\u011ferini ise &#8220;<em>succeeded<\/em>&#8221; olarak belirleyelim.<\/p>\n<p>Bu noktadan sonra e\u011fer belirledi\u011fimiz ko\u015ful ba\u015far\u0131yla ger\u00e7ekle\u015fir ve &#8220;<em>True<\/em>&#8221; blo\u011funa girerse, ilk olarak &#8220;<em>Check the Document is Analyzed<\/em>&#8221; d\u00f6ng\u00fcs\u00fcn\u00fc sonland\u0131rabilmek i\u00e7in &#8220;<em>IsDocumentAnalyzed<\/em>&#8221; variable&#8217;\u0131n\u0131n de\u011ferini &#8220;<em>true<\/em>&#8221; olarak g\u00fcncellememiz gerekmektedir. Bunun i\u00e7in yukar\u0131daki g\u00f6rselde oldu\u011fu gibi &#8220;<em>True<\/em>&#8221; blo\u011fu i\u00e7erisine &#8220;<em>Set variable<\/em>&#8221; act\u0131on&#8217;\u0131n\u0131 ekleyelim ve &#8220;<em>IsDocumentAnalyzed<\/em>&#8221; variable&#8217;\u0131n\u0131n de\u011ferini &#8220;<em>true<\/em>&#8221; olarak g\u00fcncelleyelim.<\/p>\n<p>Ben \u00f6rnek gere\u011fi happy-path senaryodan ilerledi\u011fim i\u00e7in, ba\u015far\u0131s\u0131z oldu\u011fu durumlar\u0131 ele almayaca\u011f\u0131m. Ba\u015far\u0131s\u0131z durumlarda ise kendi hata y\u00f6netim stratejilerinizi, workflow \u00fczerinde tasarlaman\u0131z gerekmektedir.<\/p>\n<p>Bu noktadan sonra art\u0131k ilgili <em>OCR<\/em> sonu\u00e7lar\u0131na eri\u015fim sa\u011flayabilir ve <em>Cosmos DB<\/em> \u00fczerine kay\u0131t edebiliriz. Bunun i\u00e7in &#8220;<em>Set variable<\/em>&#8221; action&#8217;\u0131ndan sonra yeni ad\u0131m ekle butonuna basal\u0131m ve arama kutusuna &#8220;<em>Azure<\/em> <em>Cosmos DB<\/em>&#8221; yazal\u0131m. Ard\u0131ndan action olarak &#8220;<em>Create or update document (V3) 2<\/em>&#8221; se\u00e7ene\u011fini se\u00e7elim.<\/p>\n<p>\u00d6ncelikle a\u00e7\u0131lacak olan ilk ekranda ilgili <em>Cosmos DB<\/em> account&#8217;una ait &#8220;<em>Access Key<\/em>&#8221; ve &#8220;<em>Account ID<\/em>&#8221; gibi bilgileri sa\u011flayarak, yeni bir connection olu\u015fturmam\u0131z gerekmektedir. Ard\u0131ndan a\u00e7\u0131lacak olan ikinci ekran\u0131, a\u015fa\u011f\u0131daki gibi doldural\u0131m.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/ocr-cosmosdb-result.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4041 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/ocr-cosmosdb-result.jpg\" alt=\"\" width=\"1302\" height=\"1172\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/ocr-cosmosdb-result.jpg 1302w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/ocr-cosmosdb-result-300x270.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/ocr-cosmosdb-result-1024x922.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/ocr-cosmosdb-result-768x691.jpg 768w\" data-sizes=\"(max-width: 1302px) 100vw, 1302px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1302px; --smush-placeholder-aspect-ratio: 1302\/1172;\" \/><\/a><\/p>\n<p>Bu ad\u0131mda <em>Cosmos DB<\/em> \u00fczerinde olu\u015fturaca\u011f\u0131m\u0131z dok\u00fcman\u0131 tan\u0131mlayaca\u011f\u0131z. \u0130lk olarak &#8220;<em>Account name<\/em>&#8221; se\u00e7ene\u011finde, bir \u00f6nceki ad\u0131mda olu\u015fturmu\u015f oldu\u011fumuz connection bilgisini se\u00e7elim. Ard\u0131ndan ilgili <em>OCR<\/em> sonu\u00e7lar\u0131n\u0131 tutmak istedi\u011fimiz &#8220;<em>Database<\/em>&#8221; ve &#8220;<em>Collection<\/em>&#8221; bilgilerini sa\u011flamam\u0131z\u00a0 gerekmektedir. Ben ilgili sonu\u00e7lar\u0131 daha \u00f6nceden olu\u015fturmu\u015f oldu\u011fum &#8220;<em>DocumentOCRDB<\/em>&#8221; database&#8217;inde bulunan &#8220;<em>Documents<\/em>&#8221; collection&#8217;\u0131 i\u00e7erisinde saklayaca\u011f\u0131m.<\/p>\n<p>&#8220;<em>Document<\/em>&#8221; k\u0131sm\u0131nda ise <em>OCR\u00a0<\/em>sonu\u00e7lar\u0131n\u0131 collection i\u00e7erisinde nas\u0131l saklayaca\u011f\u0131m\u0131z\u0131 tan\u0131ml\u0131yoruz. Bu k\u0131s\u0131mda ise dok\u00fcman model&#8217;ini, istedi\u011finiz gibi tasarlayabilirsiniz. Ben \u00f6rnek olmas\u0131 a\u00e7\u0131s\u0131ndan <em>OCR<\/em> sonu\u00e7lar\u0131n\u0131\u00a0<em>Get Read Result<\/em> endpoint&#8217;inden response olarak geldi\u011fi gibi saklayaca\u011f\u0131m. <em>OCR<\/em> sonu\u00e7lar\u0131 ise a\u015fa\u011f\u0131daki gibi bir formatta gelmektedir.<\/p>\n<pre>{\r\n  \"status\": \"\",\r\n  \"analyzeResult\": {\r\n      \"readResults\": [\r\n          {\r\n            ...\r\n          }\r\n        ]\r\n    }\r\n}<\/pre>\n<p>Bu sonu\u00e7lara eri\u015febilmek i\u00e7in ise, a\u015fa\u011f\u0131daki gibi bir expression yazmam\u0131z yeterli olacakt\u0131r.<\/p>\n<pre>body('ComputerVisionAPIGetReadResultEndpoint')['analyzeResult']['readResults']<\/pre>\n<p><em>Get Read Result<\/em> endpoint&#8217;inin response model detaylar\u0131na ise, <em><a href=\"https:\/\/westeurope.dev.cognitive.microsoft.com\/docs\/services\/computer-vision-v3-2\/operations\/5d9869604be85dee480c8750\" target=\"_blank\" rel=\"noopener\">buradan<\/a><\/em> ula\u015fabilirsiniz.<\/p>\n<p>B\u00f6ylece <em>Azure<\/em>&#8216;un serverless ve managed hizmetlerden yararlanarak, otomatikle\u015ftirilmi\u015f bir <em>OCR<\/em> workflow&#8217;u olu\u015fturmu\u015f olduk. Art\u0131k <em>Blob Storage<\/em> \u00fczerine yeni bir dok\u00fcman upload edildi\u011finde, bu workflow \u00e7al\u0131\u015facak ve ilgili dok\u00fcman i\u00e7in <em>OCR<\/em> i\u015flemlerini otomatik bir \u015fekilde ger\u00e7ekle\u015ftirecektir.<\/p>\n<h2>Test Edelim<\/h2>\n<p>H\u0131zl\u0131 bir test i\u015flemi ger\u00e7ekle\u015ftirebilmek i\u00e7in, a\u015fa\u011f\u0131daki gibi ilgili <em>Azure Function<\/em> adresine bir <em>PDF<\/em> dok\u00fcman\u0131 upload iste\u011fi g\u00f6nderelim. Benim upload edece\u011fim \u00f6rnek <em>PDF<\/em> dok\u00fcman\u0131, i\u00e7erisinde sadece &#8220;<em>Hello, how are you<\/em>&#8221; \u015feklinde basit bir metin i\u00e7ermektedir.<\/p>\n<div>\n<pre>curl --location --request POST 'https:\/\/YOUR_FUNCTION_URL\/api\/UploadADocument' --form 'file=@\"\/YOUR_PATH\/977ab862-e432-4bf6-83ee-94453bfb6768.pdf\"'<\/pre>\n<\/div>\n<p>Upload i\u015flemi tamamland\u0131ktan sonra ise olu\u015fturmu\u015f oldu\u011fumuz &#8220;<em>DocumentOcrWorkflow<\/em>&#8221; isimli <em>Logic App<\/em> kayna\u011f\u0131n\u0131n &#8220;<em>Overview<\/em>&#8221; sayfas\u0131na giderek, &#8220;<em>Run History<\/em>&#8221; sekmesine ge\u00e7elim.<\/p>\n<p>Bu sekmeden ilgili <em>Logic App<\/em>&#8216;in \u00e7al\u0131\u015fma ge\u00e7mi\u015fine ula\u015fabiliriz. E\u011fer upload i\u015flemi sonras\u0131nda ilgili <em>Logic App<\/em> ba\u015far\u0131l\u0131 bir \u015fekilde \u00e7al\u0131\u015ft\u0131 ise, a\u015fa\u011f\u0131daki gibi bir ekran g\u00f6r\u00fcyor olmam\u0131z gerekmektedir.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/logic-app-run-history.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4045 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/logic-app-run-history.jpg\" alt=\"\" width=\"1584\" height=\"144\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/logic-app-run-history.jpg 1584w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/logic-app-run-history-300x27.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/logic-app-run-history-1024x93.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/logic-app-run-history-768x70.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/logic-app-run-history-1536x140.jpg 1536w\" data-sizes=\"(max-width: 1584px) 100vw, 1584px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1584px; --smush-placeholder-aspect-ratio: 1584\/144;\" \/><\/a><\/p>\n<p>Daha sonra ilgili workflow&#8217;un \u00e7al\u0131\u015fma detay\u0131na ula\u015fabilmek i\u00e7in ise, g\u00f6rm\u00fc\u015f oldu\u011fumuz sonucun \u00fczerine t\u0131klamam\u0131z yeterli olacakt\u0131r.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/logic-app-status-run.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4046 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/logic-app-status-run.jpg\" alt=\"\" width=\"1256\" height=\"1510\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/logic-app-status-run.jpg 1256w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/logic-app-status-run-250x300.jpg 250w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/logic-app-status-run-852x1024.jpg 852w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/logic-app-status-run-768x923.jpg 768w\" data-sizes=\"(max-width: 1256px) 100vw, 1256px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1256px; --smush-placeholder-aspect-ratio: 1256\/1510;\" \/><\/a><\/p>\n<p>G\u00f6rm\u00fc\u015f oldu\u011fumuz gibi ilgili dok\u00fcman&#8217;\u0131n <em>Blob Storage<\/em> \u00fczerine upload edilmesinden sonra, tan\u0131mlam\u0131\u015f oldu\u011fumuz <em>Blob Storage<\/em> trigger&#8217;\u0131 ba\u015far\u0131yla tetiklenmi\u015f ve t\u00fcm ad\u0131mlar workflow taraf\u0131ndan s\u0131ras\u0131yla \u00e7al\u0131\u015ft\u0131r\u0131lm\u0131\u015ft\u0131r. Dilerseniz bu ad\u0131mlar\u0131n da \u00fczerlerine t\u0131klayarak, o anki detaylar\u0131na eri\u015febilirsiniz.<\/p>\n<p>Ayr\u0131ca <em>Cosmos DB<\/em>&#8216;ye bakt\u0131\u011f\u0131m\u0131zda ise, ilgili dok\u00fcman&#8217;\u0131n id bilgisi kullan\u0131larak &#8220;<em>Documents<\/em>&#8221; collection&#8217;\u0131 i\u00e7erisinde a\u015fa\u011f\u0131daki gibi bir kay\u0131t olu\u015fturuldu\u011funu da g\u00f6rebiliriz.<\/p>\n<p><a href=\"\/wp-content\/uploads\/2022\/03\/cosmosdb-ocr-result.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4047 lazyload\" data-src=\"\/wp-content\/uploads\/2022\/03\/cosmosdb-ocr-result.jpg\" alt=\"\" width=\"2216\" height=\"1320\" data-srcset=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/cosmosdb-ocr-result.jpg 2216w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/cosmosdb-ocr-result-300x179.jpg 300w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/cosmosdb-ocr-result-1024x610.jpg 1024w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/cosmosdb-ocr-result-768x457.jpg 768w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/cosmosdb-ocr-result-1536x915.jpg 1536w, https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/cosmosdb-ocr-result-2048x1220.jpg 2048w\" data-sizes=\"(max-width: 2216px) 100vw, 2216px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 2216px; --smush-placeholder-aspect-ratio: 2216\/1320;\" \/><\/a><\/p>\n<p>Bu <em>OCR<\/em> sonu\u00e7lar\u0131 i\u00e7erisinde ise dok\u00fcman&#8217;\u0131n metadata bilgilerinden, bulunan metin&#8217;lerin do\u011fruluk puanlar\u0131 ile birlikte koordinatlar\u0131na kadar bilgiler yer almaktad\u0131r.<\/p>\n<p>Benim \u00f6rne\u011fim i\u00e7in <em>JSON<\/em> response&#8217;u ise a\u015fa\u011f\u0131daki gibidir.<\/p>\n<pre>{\r\n    \"id\": \"977ab862-e432-4bf6-83ee-94453bfb6768\",\r\n    \"readResults\": [\r\n        {\r\n            \"page\": 1,\r\n            \"angle\": 0,\r\n            \"width\": 8.2639,\r\n            \"height\": 11.6806,\r\n            \"unit\": \"inch\",\r\n            \"lines\": [\r\n                {\r\n                    \"boundingBox\": [\r\n                        1.0132,\r\n                        1.028,\r\n                        2.1575,\r\n                        1.028,\r\n                        2.1575,\r\n                        1.1594,\r\n                        1.0132,\r\n                        1.1594\r\n                    ],\r\n                    \"text\": \"Hello, how are you\",\r\n                    \"appearance\": {\r\n                        \"style\": {\r\n                            \"name\": \"other\",\r\n                            \"confidence\": 1\r\n                        }\r\n                    },\r\n                    \"words\": [\r\n                        {\r\n                            \"boundingBox\": [\r\n                                1.0132,\r\n                                1.028,\r\n                                1.3514,\r\n                                1.028,\r\n                                1.3514,\r\n                                1.1538,\r\n                                1.0132,\r\n                                1.1538\r\n                            ],\r\n                            \"text\": \"Hello,\",\r\n                            \"confidence\": 1\r\n                        },\r\n                        {\r\n                            \"boundingBox\": [\r\n                                1.4082,\r\n                                1.028,\r\n                                1.6625,\r\n                                1.028,\r\n                                1.6625,\r\n                                1.1334,\r\n                                1.4082,\r\n                                1.1334\r\n                            ],\r\n                            \"text\": \"how\",\r\n                            \"confidence\": 1\r\n                        },\r\n                        {\r\n                            \"boundingBox\": [\r\n                                1.7072,\r\n                                1.0595,\r\n                                1.8962,\r\n                                1.0595,\r\n                                1.8962,\r\n                                1.1334,\r\n                                1.7072,\r\n                                1.1334\r\n                            ],\r\n                            \"text\": \"are\",\r\n                            \"confidence\": 1\r\n                        },\r\n                        {\r\n                            \"boundingBox\": [\r\n                                1.9395,\r\n                                1.0595,\r\n                                2.1575,\r\n                                1.0595,\r\n                                2.1575,\r\n                                1.1594,\r\n                                1.9395,\r\n                                1.1594\r\n                            ],\r\n                            \"text\": \"you\",\r\n                            \"confidence\": 1\r\n                        }\r\n                    ]\r\n                }\r\n            ]\r\n        }\r\n    ],\r\n}\r\n<\/pre>\n<p>Art\u0131k yukar\u0131daki <em>OCR<\/em> sonu\u00e7lar\u0131n\u0131 kullanarak, ilgili dok\u00fcman&#8217;\u0131n i\u00e7erdi\u011fi metinler ile birlikte sistem i\u00e7erisine otomatik olarak aktar\u0131labilmesini sa\u011flayabiliriz.<\/p>\n<h2>Referanslar<\/h2>\n<blockquote><p>https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/functions-scale#overview-of-plans<br \/>\nhttps:\/\/docs.microsoft.com\/en-us\/azure\/cognitive-services\/computer-vision\/overview-ocr<br \/>\nhttps:\/\/docs.microsoft.com\/en-us\/azure\/cognitive-services\/computer-vision\/vision-api-how-to-topics\/call-read-api#determine-how-to-process-the-data-optional<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>San\u0131r\u0131m hepimiz g\u00fcn\u00fcm\u00fczde dijital d\u00f6n\u00fc\u015f\u00fcm\u00fcn \u00f6neminin ve dijitalle\u015fme ile elde edebilece\u011fimiz faydalar\u0131n fark\u0131nday\u0131zd\u0131r. Bildi\u011fimiz \u00fczere bu kapsamda bir \u00e7ok kurulu\u015f da dijital d\u00f6n\u00fc\u015f\u00fcm yolunda farkl\u0131 at\u0131l\u0131mlar ger\u00e7ekle\u015ftirmektedirler. Fakat bazen bu d\u00f6n\u00fc\u015f\u00fcm s\u00fcre\u00e7leri i\u00e7erisinde de farkl\u0131 zorluklarla kar\u015f\u0131la\u015fabilmekteyiz. \u00d6rne\u011fin data&#8216;n\u0131n dijitalle\u015ftirilmesi s\u00fcre\u00e7lerinde insan g\u00fcc\u00fc gerektiren baz\u0131&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/gokhan-gokalp.com\/tr\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/\">Devam\u0131n\u0131 okuyun<span class=\"screen-reader-text\">Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow&#8217;u Olu\u015fturma<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":4066,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,418],"tags":[635,638,631,634,637,632,633,636,630,487],"class_list":["post-3989","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-net","category-azure","tag-net-6","tag-azure-blob-storage","tag-azure-computer-vision","tag-azure-function","tag-azure-logic-app","tag-azure-ocr","tag-azure-read-api","tag-managed","tag-ocr","tag-serverless","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"tr","enabled_languages":["en","tr"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"tr":{"title":true,"content":true,"excerpt":false}}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow&#039;u Olu\u015fturma - G\u00f6khan G\u00f6kalp<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow&#039;u Olu\u015fturma - G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/\" \/>\n<meta property=\"og:site_name\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-26T11:23:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-27T12:43:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"G\u00f6khan G\u00f6kalp\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"36 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/\"},\"author\":{\"name\":\"G\u00f6khan G\u00f6kalp\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"headline\":\"Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow&#8217;u Olu\u015fturma\",\"datePublished\":\"2022-03-26T11:23:16+00:00\",\"dateModified\":\"2022-03-27T12:43:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/\"},\"wordCount\":6811,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"image\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg\",\"keywords\":[\".net 6\",\"azure blob storage\",\"azure computer vision\",\"azure function\",\"azure logic app\",\"azure ocr\",\"azure read api\",\"managed\",\"ocr\",\"serverless\"],\"articleSection\":[\".NET\",\"Azure\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/\",\"name\":\"Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow'u Olu\u015fturma - G\u00f6khan G\u00f6kalp\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg\",\"datePublished\":\"2022-03-26T11:23:16+00:00\",\"dateModified\":\"2022-03-27T12:43:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/#primaryimage\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg\",\"contentUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg\",\"width\":1200,\"height\":675},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building OCR Workflow on Azure By Using Azure Function, Logic Apps and Computer Vision API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#website\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"description\":\"C# &amp; Python lover\",\"publisher\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gokhan-gokalp.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/#\\\/schema\\\/person\\\/7e2a7fa98babd22a5fdae563c4b8cdbe\",\"name\":\"G\u00f6khan G\u00f6kalp\",\"pronouns\":\"he\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506\",\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506\",\"contentUrl\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506\",\"caption\":\"G\u00f6khan G\u00f6kalp\"},\"logo\":{\"@id\":\"https:\\\/\\\/gokhan-gokalp.com\\\/wp-content\\\/litespeed\\\/avatar\\\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506\"},\"sameAs\":[\"https:\\\/\\\/gokhan-gokalp.com\"],\"url\":\"https:\\\/\\\/gokhan-gokalp.com\\\/tr\\\/author\\\/gok-gokalp\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow'u Olu\u015fturma - G\u00f6khan G\u00f6kalp","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/","og_locale":"tr_TR","og_type":"article","og_title":"Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow'u Olu\u015fturma - G\u00f6khan G\u00f6kalp","og_url":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/","og_site_name":"G\u00f6khan G\u00f6kalp","article_published_time":"2022-03-26T11:23:16+00:00","article_modified_time":"2022-03-27T12:43:48+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg","type":"image\/jpeg"}],"author":"G\u00f6khan G\u00f6kalp","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"G\u00f6khan G\u00f6kalp","Tahmini okuma s\u00fcresi":"36 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/#article","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/"},"author":{"name":"G\u00f6khan G\u00f6kalp","@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"headline":"Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow&#8217;u Olu\u015fturma","datePublished":"2022-03-26T11:23:16+00:00","dateModified":"2022-03-27T12:43:48+00:00","mainEntityOfPage":{"@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/"},"wordCount":6811,"commentCount":0,"publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"image":{"@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/#primaryimage"},"thumbnailUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg","keywords":[".net 6","azure blob storage","azure computer vision","azure function","azure logic app","azure ocr","azure read api","managed","ocr","serverless"],"articleSection":[".NET","Azure"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/","url":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/","name":"Azure Function, Logic Apps ve Computer Vision API Kullanarak Azure \u00dczerinde OCR Worflow'u Olu\u015fturma - G\u00f6khan G\u00f6kalp","isPartOf":{"@id":"https:\/\/gokhan-gokalp.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/#primaryimage"},"image":{"@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/#primaryimage"},"thumbnailUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg","datePublished":"2022-03-26T11:23:16+00:00","dateModified":"2022-03-27T12:43:48+00:00","breadcrumb":{"@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/"]}]},{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/#primaryimage","url":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg","contentUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/uploads\/2022\/03\/azure-ocr-logic-apps-computer-vision-gokhan-gokalp.jpg","width":1200,"height":675},{"@type":"BreadcrumbList","@id":"https:\/\/gokhan-gokalp.com\/building-ocr-workflow-on-azure-by-using-azure-function-logic-apps-and-computer-vision-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gokhan-gokalp.com\/"},{"@type":"ListItem","position":2,"name":"Building OCR Workflow on Azure By Using Azure Function, Logic Apps and Computer Vision API"}]},{"@type":"WebSite","@id":"https:\/\/gokhan-gokalp.com\/#website","url":"https:\/\/gokhan-gokalp.com\/","name":"G\u00f6khan G\u00f6kalp","description":"C# &amp; Python lover","publisher":{"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gokhan-gokalp.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/gokhan-gokalp.com\/#\/schema\/person\/7e2a7fa98babd22a5fdae563c4b8cdbe","name":"G\u00f6khan G\u00f6kalp","pronouns":"he","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506","url":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506","contentUrl":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506","caption":"G\u00f6khan G\u00f6kalp"},"logo":{"@id":"https:\/\/gokhan-gokalp.com\/wp-content\/litespeed\/avatar\/e645f66b6264ced10d7b6d8b1f85509b.jpg?ver=1776775506"},"sameAs":["https:\/\/gokhan-gokalp.com"],"url":"https:\/\/gokhan-gokalp.com\/tr\/author\/gok-gokalp\/"}]}},"_links":{"self":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/3989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/comments?post=3989"}],"version-history":[{"count":5,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/3989\/revisions"}],"predecessor-version":[{"id":4069,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/posts\/3989\/revisions\/4069"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/media\/4066"}],"wp:attachment":[{"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/media?parent=3989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/categories?post=3989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gokhan-gokalp.com\/tr\/wp-json\/wp\/v2\/tags?post=3989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}