npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

baidu-ocr2

v1.0.1

Published

百度中文图像识别API - 修正 imageType 无效

Downloads

2

Readme

Baidu-ocr

百度OCR文字识别API For Node

Install

npm install baidu-ocr

Test

BAIDU_APIKEY='your api key' make test

How to use

var ocr = require('baidu-ocr').create( 'your api key' ),
  image = fs.createReadStream( __dirname + '/love-letter.jpg' );

// detectType: `LocateRecognize`代表整图文字检测、识别,以行为单位(默认)  
// languageType: `CHN_ENG`(中英)(默认)  
// imageType: `2`代表图片原文件(只支持JPG,大小不能超过300K)
// image: 图片流对象 或 base64 编码的字符串  
ocr.scan( 'LocateRecognize', 'CHN_ENG', 2, image, function( err, data ) {
  if ( err ) {
    return console.error( err );
  }

  console.log( 'words:' );
  console.log( data.word );
});

实测

识别率几乎100%

启示录

一、中央官制  
(一)汉初的丞相制
汉初的官制,大体因袭秦代,中央政府的高级官吏,仍
以丞相、太尉御史大夫为主,汉人称之为“三公”。丞相仍
是全国官吏的最高首长,掌理国家的大政;其他重要官员的
职掌也与秦时没有多大出入。所不同的,只是有若干官名
更动,并且新添了一些职官而已。

高祖即帝位后,以萧何为丞相,末年改丞相为相国,仍
以萧任之惠帝时,曹参继任相国。惠帝五年(前1,90)参
死,汉取消相国,改置左右丞相,名次以右丞相居先。文帝
二年(前178)撤销左右丞相,改置丞相一人;其后直至哀
帝时,始改名为大司徒。丞相金印紫绶,秩万石。其重要僚
属有丞相司直—人(武帝时始设,秩二千石)司佐丞相纠
不法;丞相长史二人(秩举相征事、丞千石)司领导群僚;其下
又有丞相相史等。丞相史原为十五人,武帝时增至二十人

LICENSE

The MIT License (MIT) Copyright (c) 2014 Jeremy Wei

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.