百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rtesseract

> 编程语言
开源

用于处理 Tesseract OCR 的 Ruby 库。

882 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于处理 Tesseract OCR 的 Ruby 库。

RTesseract

用于处理 Tesseract OCR 的 Ruby 库。

安装

检查是否安装了 tesseract ocr 程序: $ tesseract --version 如果没有,您可以使用如下命令安装它们: $ apt install tesseract-ocr 或者 $ brew install tesseract 或者为 Heroku 22 添加 buildpack https://github.com/pathwaysmedical/heroku-buildpack-tesseract 将以下一行添加到您应用程序的 Gemfile 中:

ruby
gem 'rtesseract'

然后执行: $ bundle 或者自己安装如下: $ gem install rtesseract

使用方法

使用 rtesseract 非常简单。

将图像转换为字符串

ruby
  image = RTesseract.new("my_image.jpg")
  image.to_s # Getting the value

将图像转换为可搜索的 PDF

ruby
  image = RTesseract.new("my_image.jpg")
  image.to_pdf  # Getting open file of pdf

将图像转换为 TSV

ruby
  image = RTesseract.new("my_image.jpg")
  image.to_tsv  # Getting open file of tsv

这将保留生成的 PDF 中的图像颜色、图片和结构。

检查仓库后,运行 bin/setup 以安装依赖项。然后,运行 rake spec 以运行测试。您还可以运行 bin/console 以获得交互式提示,从而进行实验。要将此宝石安装到本地机器上,请运行 bundle exec rake install。要发布新版本,请在 version.rb 中更新版本号,然后运行 bundle exec rake release。这将为版本创建一个 git 标签,推送 git 提交和标签,并

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyhacktoberfestrtesseractrubytesseract

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言