none
Why OCR Cognitive analytics fails? - Cannot implicitly convert type 'Cognition.Vision.OcrExtractor' to 'Microsoft.Analytics.Interfaces.IProcessor'. RRS feed

  • Question

  • I'm trying to OCR analytics at Azure Portal, but I get error "C# error CS0029: Cannot implicitly convert type 'Cognition.Vision.OcrExtractor' to 'Microsoft.Analytics.Interfaces.IProcessor'. ResolutionMake sure that a valid C# expression is specified.

    I do have installed U-SQL Extensions. I'm following example of https://docs.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-u-sql-cognitive 

    Code is:

    U-SQL: Cognitive Imaging OCR Hello World

    REFERENCE ASSEMBLY ImageCommon;
    REFERENCE ASSEMBLY FaceSdk;
    REFERENCE ASSEMBLY ImageEmotion;
    REFERENCE ASSEMBLY ImageTagging;
    REFERENCE ASSEMBLY ImageOcr;
    
    @imgs =
        EXTRACT 
            FileName string, 
            ImgData byte[]
        FROM @"/usqlext/samples/cognition/{FileName}.jpg"
        USING new Cognition.Vision.ImageExtractor();
    
    @ocrs =
        PROCESS @imgs
        PRODUCE FileName,
                Text string
        READONLY FileName
        USING new Cognition.Vision.OcrExtractor();
    
    OUTPUT @ocrs
        TO "/ocr.csv"
        USING Outputters.Csv( outputHeader: true );



    Kenny_I

    Friday, September 28, 2018 10:01 AM

All replies

  • Hi Kenny,

       Please take a look at this thread. This should help you resolve the error.

    https://social.msdn.microsoft.com/Forums/azure/en-US/bbcefdff-ac06-4e44-8dba-0a01afc93b21/cognitive-extractors?forum=AzureDataLake


    Friday, September 28, 2018 5:51 PM
    Moderator