Git Product home page Git Product logo

tianyancha-ttf's Introduction

最近学习爬虫,发现天眼查字库会进行替换,于是就学着如何获取正确的数据

配置:

安装依赖 pip install -r requirements.txt

centos7.X 安装 tesseract-ocr

(1)依赖安装:
    yum install -y automake autoconf libtool gcc gcc-c++
    yum install autoconf automake libtool
    yum install libjpeg-devel libpng-devel libtiff-devel zlib-devel

(2)安装leptonica

    wget http://www.leptonica.org/source/leptonica-1.72.tar.gz
    tar xvzf leptonica-1.72.tar.gz
    cd leptonica-1.72/
    ./configure
    make && make install

(3)安装tesseract-ocr

    wget https://github.com/tesseract-ocr/tesseract/archive/3.04.zip
    unzip 3.04.zip
    cd tesseract-3.04/
    ./configure
    make && make install
    sudo ldconfig

 (4)在 /user/local/share/tessdata 下放置 chi_sim.traineddata

    下载地址: https://github.com/tesseract-ocr/tessdata

运行: python3 ttf.py (数字替换) python3 font.py (所有字体替换)

其他: ttf.py实现了 数字的正确获取 font.py 实现将所有被替换字体合并成一张图片, 并通过腾讯云通用印刷体ocr识别出正确的对应关系

tianyancha-ttf's People

Contributors

tornado008 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.