模糊匹配文本文件中的OCR输出

时间:2018-01-16 22:21:22

标签: ocr fuzzy-search uipath

我对两个字符串的部分匹配有疑问。

我有一个字符串,我需要验证它。更具体地说,我有一个OCR读数的输出,当然它包含一些错误。我需要检查字符串是否真的存在,但由于它可能写得不正确,我只需要70%匹配。

是否可以在UiPath中执行此操作?该字符串在记事本(.txt)中,因此任何idead都会有所帮助。

1 个答案:

答案 0 :(得分:0)

尝试对基本字传递OCR输出/ words_detected。(双模糊度为0-1)

    # -*- coding: utf-8 -*-
    import scrapy # needed to scrape
    import sys    # need to import xlrd
    sys.path.extend("/Users/YoungFreeesh/anaconda3/lib/python3.6/site- 
    packages/") # needed to import xlrd
    import xlrd   # used to easily import xlsx file 

    class AmazonbotSpider(scrapy.Spider):
        name = 'ArchiveSpider'

        allowed_domains = ['web.archive.org']
        start_urls =['https://web.archive.org/web/20180604230058/https://api.simon.com/v1.2/tenant?mallId=231&key=40A6F8C3-3678-410D-86A5-BAEE2804C8F2&lw=true']

        def parse(self, response):
            print(response.body)