Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aspose-ocr-cloud

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aspose-ocr-cloud

Aspose OCR Cloud 5.0 API

  • 24.8.0
  • PyPI
  • Socket score

Maintainers
1
# Aspose.OCR Cloud for Python SDK 24.8.0

PyPI PyPI - Format PyPI - Downloads GitHub license

Aspose.OCR Cloud is an optical character recognition as a service. With it, you can easily add OCR functionality to almost any device or platform, including netbooks, mini PCs, or even entry-level smartphones.

Our engine can read text from images, photos, screenshots and scanned PDFs in a wide variety of European, Cyrillic and Oriental fonts, returning results in the most popular document formats. Powerful built-in image processing filters based on neural networks automatically correct skewed and distorted images, automatically remove dirt, smudges, scratches, glare and other image defects that can affect recognition accuracy. To further improve the results, Aspose.OCR Cloud has a built-in spell checker that automatically replaces misspelled words and saves you the trouble of manually correcting the recognition results.

Even the complex recognition tasks can be done with a couple of API calls. To make interacting with Aspose.OCR Cloud services from Python applications even easier, we provide the software development kit (SDK) for Python. It handles all the routine operations such as establishing connections, sending API requests, and parsing responses, wrapping all these tasks into a few simple classes.

Aspose.OCR Cloud SDK for Python is open source under the MIT license. You can freely use it for any projects, including commercial and proprietary applications, as well as modify any part of its code.

Try Online

Image to TextImage to Searchable PDFPDF OCRReceipt Scanner
Scan ImageImage to Searchable PDFPDF OCRReceipt Scanner

What was changed in version 24.8.0

A summary of recent changes, enhancements and bug fixes in Aspose.OCR Cloud SDK for .NET 24.8.0 release:

KeySummaryCategory
OCR‑3930Added support for 149 recognition languages.Enhancement

REST API changes: https://releases.aspose.cloud/ocr/release-notes/2024/aspose-ocr-cloud-24-8-0-release-notes/

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OCR Cloud SDK for .NET 24.8.0 that may affect the code of existing applications.

Added public APIs:

No changes.

Updated public APIs:

The following public APIs have been updated in this release:

JSON result type

{{% alert color="info" %}} Compatibility: fully backward compatible. {{% /alert %}}

Aspose.OCR Cloud greatly expands the number of languages supported. We have added a total of 149 languages based on Latin, Cyrillic, Chinese and Indic scripts. By default, the text is considered to be in English.

LanguageValue
AfrikaansLanguage.Afrikaans
AlbanianLanguage.Albanian
ArabicLanguage.Arabic
AwadhiLanguage.Awadhi
AzerbaijaniLanguage.Azerbaijani
BelorussianLanguage.Belorussian
BembaLanguage.Bemba
BengaliLanguage.Bengali
BetawiLanguage.Betawi
BhojpuriLanguage.Bhojpuri
BikolLanguage.Bikol
BosnianLanguage.Bosnian
BouyeiLanguage.Bouyei
BulgarianLanguage.Bulgarian
CantoneseLanguage.Cantonese
CatalanLanguage.Catalan
CebuanoLanguage.Cebuano
ChattisgarhiLanguage.Chattisgarhi
ChechenLanguage.Chechen
ChichewaLanguage.Chichewa
ChineseLanguage.Chinese
CroatianLanguage.Croatian
CzechLanguage.Czech
DanishLanguage.Danish
DhundariLanguage.Dhundari
DimliLanguage.Dimli
DongLanguage.Dong
DutchLanguage.Dutch
EnglishLanguage.English
Handwritten EnglishLanguage.HWT_ENG
EstonianLanguage.Estonian
FinnishLanguage.Finnish
FrenchLanguage.French
GalicianLanguage.Galician
GanLanguage.Gan
GarhwaliLanguage.Garhwali
GeorgianLanguage.Georgian
GermanLanguage.German
GilakiLanguage.Gilaki
GreekLanguage.Greek
GusiiLanguage.Gusii
HakkaLanguage.Hakka
HaryanviLanguage.Haryanvi
HausaLanguage.Hausa
HebrewLanguage.Hebrew
HiligaynonLanguage.Hiligaynon
HindiLanguage.Hindi
HmongLanguage.Hmong
HungarianLanguage.Hungarian
IlocanoLanguage.Ilocano
IndonesianLanguage.Indonesian
ItalianLanguage.Italian
JapaneseLanguage.Japanese
JavaneseLanguage.Javanese
KabardianLanguage.Kabardian
KanaujiLanguage.Kanauji
KanuriLanguage.Kanuri
KapampanganLanguage.Kapampangan
KazahLanguage.Kazah
KicheLanguage.Kiche
KikongoLanguage.Kikongo
KonkaniLanguage.Konkani
KoreanLanguage.Korean
KumauniLanguage.Kumauni
KurdishLanguage.Kurdish
LamaniLanguage.Lamani
LatinLanguage.Latin
LatvianLanguage.Latvian
LithuanianLanguage.Lithuanian
Low GermanLanguage.Low_German
LuguruLanguage.Luguru
LuoLanguage.Luo
MacedonianLanguage.Macedonian
MagahiLanguage.Magahi
MaithiliLanguage.Maithili
MakassarLanguage.Makassar
MakuaLanguage.Makua
MalagasyLanguage.Malagasy
MalayLanguage.Malay
MalviLanguage.Malvi
MarathiLanguage.Marathi
MarwariLanguage.Marwari
MeruLanguage.Meru
MewariLanguage.Mewari
MewatiLanguage.Mewati
Min BeiLanguage.Min_Bei
Min DongLanguage.Min_Dong
Min NanLanguage.Min_Nan
MinangkabauLanguage.Minangkabau
MuongLanguage.Muong
MusiLanguage.Musi
NandiLanguage.Nandi
NdebeleLanguage.Ndebele
NepaliLanguage.Nepali
NetherlandsLanguage.Netherlands
NorwegianLanguage.Norwegian
OccitanLanguage.Occitan
OromoLanguage.Oromo
PalembangLanguage.Palembang
PangasinanLanguage.Pangasinan
PersianLanguage.Persian
PolishLanguage.Polish
PortugueseLanguage.Portuguese
Pu-XianLanguage.Pu_Xian
QuechuaLanguage.Quechua
RajbanshiLanguage.Rajbanshi
RomanianLanguage.Romanian
RussianLanguage.Russian
RwandaLanguage.Rwanda
SasakLanguage.Sasak
SerbianLanguage.Serbian
Serbo-CroatianLanguage.Serbo_Croatian
Serer-SineLanguage.Serer_Sine
ShonaLanguage.Shona
SlovakLanguage.Slovak
SloveneLanguage.Slovene
SomaliLanguage.Somali
Sotho (Northern)Language.Sotho_Northern
Sotho (Southern)Language.Sotho_Southern
SpanishLanguage.Spanish
SukumaLanguage.Sukuma
SundaneseLanguage.Sundanese
SwahiliLanguage.Swahili
SwatiLanguage.Swati
SwedishLanguage.Swedish
TagalogLanguage.Tagalog
ThaiLanguage.Thai
TibetanLanguage.Tibetan
TongaLanguage.Tonga
TsongaLanguage.Tsonga
TswanaLanguage.Tswana
TumbukaLanguage.Tumbuka
TurkishLanguage.Turkish
TurkmenLanguage.Turkmen
UkrainanLanguage.Ukrainan
UmbunduLanguage.Umbundu
UrduLanguage.Urdu
UzbekLanguage.Uzbek
VietnameseLanguage.Vietnamese
WagdiLanguage.Wagdi
Waray-WarayLanguage.Waray_Waray
WolayttaLanguage.Wolaytta
WuLanguage.Wu
XhosaLanguage.Xhosa
XiangLanguage.Xiang
YaoLanguage.Yao
YorubaLanguage.Yoruba
ZhuangLanguage.Zhuang
ZuluLanguage.Zulu
Removed public APIs:

No changes.

Quickstart

Make your solution using SDK, follow these steps:

1. Get API keys if you haven't

Make a personal account on Aspose Cloud Dashboard and click Get Keys. These keys are useful for all Aspose Cloud products. If you have any trouble, look at this detailed manual.

2. Run Demo
  • Checkout the SDK or get from pip (pip install aspose-ocr-cloud)
  • Set Your AppSid & AppKey
  • Run Python console Demo


OCR in Python

# Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).

	
    with aspose_ocr_cloud.ApiClient(config) as api_client:
        # Create an instance of the API class
        api_instance = recognize_image_api.RecognizeImageApi(api_client)

        # Read image file and conver it into base64 string
        image_file_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../samples/latin.png')

        # Create request body
        body = OCRRecognizeImageBody(
            image=utils.file_to_base64(image_file_path),
            settings=OCRSettingsRecognizeImage(
                language=Language("English"),
                makeSkewCorrect=False,
                makeBinarization=False,
                makeSpellCheck=False,
                makeContrastCorrection=False,
                makeUpsampling=False,
                dsrMode=DsrMode("NoDsrNoFilter"),
                dsrConfidence=DsrConfidence("Default"),
                resultType=ResultType("Text")
            ),
        )
        try:
            # Step 1: perform post request
            task_id = api_instance.post_recognize_image(
                body,
            )
            print(f'Your task ID is {task_id}')

            # Step 2: perform get result request
            task_response : OCRResponse = api_instance.get_recognize_image(
                id=task_id
            )
            assert task_response.response_status_code == 'Ok'
            assert task_response.task_status == 'Completed'
            recognized_text_raw = task_response.results[0].data
            recognized_text = bytearray(base64.b64decode(str(recognized_text_raw))).decode('utf-8')
            print (f'Recognized text:
{recognized_text}')
            print (f'Task completed.Press Enter to continue')
            input()

        except aspose_ocr_cloud.ApiException as e:
            print("Exception when calling RecognizeImageApi: %s
" % e)


Structure

This project includes:

  • Python console demo application - "./example"
  • Module "asposeocrcloud" - this is SDK located in "./asposeocrcloud". You can integrate it in your application.
  • Module "test" - "./test" UnitTest. You can take a look at them to see various code examples.
  • Folder "docs" - "./docs" Full documentation for Aspose.OCR SDK in HTML format.

Dependencies


Aspose.OCR Cloud SDKs

.NET & CoreJavaPythonNode.jsAndroid

Product Page | Documentation | API Reference | Code Samples | Blog | Free Support | Free Trial

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc