Text In Wild Paketlenmiş Kütüphane - Voodoo RPA

by Voodoo Editor
2 sene ago
368 Views

İçindekiler Tablosu


Voodoo: Text In The Wild Paketlenmiş Kütüphane

Voodoo RPA EDEnvrionment kullanıcının robotik süreç otomasyon projelerine her şeyi geliştirmesini ve entegre etmesini sağlar. Voodoo: Text In The Wild, EDE ortamında kullanılabilir ve Voodoo’nun, Resimler üzerinde Optik Karakter Tanıma sistemini kullanarak, resimlerden metinleri ayırır ve süreç otomasyonu dahilinde süreçlerin istenilen noktalarında, bu metinlerin kullanılmasına imkan sağlar. Aşağıda, Voodoo: Text In The Wild Kütüphanesi’nin Property sınıfları, metotları ve örnek kullanımları verilmiştir.

TiwSample

TIW-Loader kitaplığını EDE’deki Voodoo Dosya Referanslarına ekleyebilirsiniz.

#Text In The Wild: TIWResponse Alanı


    public class TIWResponse
    {
        public string SourceFilePath { get; set; } // Source File Path Property
        public int Operation { get; set; } // User determines Operation Number which is referenced with which operation will be processed
        public int RetCode { get; set; } // This is the Return Code which is shown to user from Server/Service
        public string DetailedInfo { get; set; } // Detailed Info
        public int UsageLeft { get; set; } // Restricted Usage Counter
        public IList LstTextResult { get; set; } // TIW Returns the Result in List
    }


#Text In The Wild: LstTextResult Alanı


    public class LstTextResult
    {
        public int RetCode { get; set; } // Return Code From Server/Service
        public string Value { get; set; } // Returned Value From TIWService
        public float ValueProbability { get; set; } // This is the percentage which is shows the value is the wanted value

        //Image Coordinates

        public int bl_x { get; set; }
        public int bl_y { get; set; }
        public int tl_x { get; set; }
        public int tl_y { get; set; }
        public int br_x { get; set; }
        public int br_y { get; set; }
        public int tr_x { get; set; }
        public int tr_y { get; set; }
    }



#Text In The Wild: Kullanılabilecek Metotlar


    public TIWResponse digitizeDoc(string imagePath, string endPoint)

    public int LDCompute(string s, string t)


#Örnek1: Resimden Çıkarılan Metin Alanını Veri Kaynağına Alma

LstTextResult Metodu


using TIWLoader; //Add .dll to Code References
using System.Data;
using System.Linq;

string endPoint = ""; //TIW Services End Point etc: http://endpoint.com:portno/recognize 
TIW TIWObj = new TIW();
TIWResponse TIWResponseObj = TIWObj.digitizeDoc(@"C:\inetpub\wwwroot\tiwpage\test1.jpg", endPoint);

if (TIWResponseObj.LstTextResult.Count() > 0)
{
    foreach (LstTextResult LstTextResultObj in TIWResponseObj.LstTextResult)
    {
        if (LstTextResultObj.Value != "")
        {
            DataRow dr = planDataInstanceManager_.GetNewRow(10);
            dr["words"] = LstTextResultObj.Value;
            planDataInstanceManager_.AddRowToDataTable(10, dr);

        }
    }
}

result_ = true;

#Örnek2: Metinler Arasındaki Farklar

LDCompute Metodu


    int distance = TIWObj.LDCompute(LstTextList[0].Value, "thisismytext");

Note: Distance “0”‘ın anlamı metinler tamamen aynı demektir. Örneğin; “3”‘ün anlamı, metinler arasında 3 ayrı farklılık var demektir.