Aspose.OCR for Python via Java API docs
Loading...
Searching...
No Matches

Manage downloadable resources that enhance Aspose.OCR recognition capabilities. More...

Static Public Member Functions

 __init__ ()
 
 allow_automatic_downloads (bool allow)
 Allow (true) or block (false) automatic downloading of required resources from the online repository.
 
 fetch_all ()
 Download all compatible resources from the online repository.
 
 fetch_resources ([] names)
 Download the resources specified in the names parameter from the online repository.
 
 get_local_path ()
 Return the full path to the directory where the resources will be downloaded.
 
 get_repository ()
 Return the URL of the online repository from which Aspose.OCR resources are downloaded.
 
[str] list_local ()
 List all Aspose.OCR resources stored in the local directory.
 
[str] list_remote ()
 List all compatible resources from the online repository.
 
 set_local_path (str path, bool create=True)
 Specify an absolute or relative path to the directory where the resources will be downloaded.
 
 set_repository (str url)
 Specify the URL of the online repository from which Aspose.OCR resources will be downloaded.
 

Detailed Description

Manage downloadable resources that enhance Aspose.OCR recognition capabilities.

Author
Aspose
Version
24.3.0

Constructor & Destructor Documentation

◆ __init__()

__init__ ( )
static

Member Function Documentation

◆ allow_automatic_downloads()

allow_automatic_downloads ( bool  allow)
static

Allow (true) or block (false) automatic downloading of required resources from the online repository.

By default, a resource is automatically downloaded when a method that depends on it is called.

Parameters
allowBoolean value to allow or block automatic downloading of required resources.

◆ fetch_all()

fetch_all ( )
static

Download all compatible resources from the online repository.

The existing resource files will be overwritten.

◆ fetch_resources()

fetch_resources ( []  names)
static

Download the resources specified in the names parameter from the online repository.

If one or more resources are already downloaded, they will be overwritten. You can omit the .OCR extension and use file names only.

Parameters
namesArray with resources names. See the ListRemote method.

◆ get_local_path()

get_local_path ( )
static

Return the full path to the directory where the resources will be downloaded.

Returns
String with the path to the resources directory.

◆ get_repository()

get_repository ( )
static

Return the URL of the online repository from which Aspose.OCR resources are downloaded.

Returns
URL of the online repository.

◆ list_local()

[str] list_local ( )
static

List all Aspose.OCR resources stored in the local directory.

Returns
List all Aspose.OCR resources stored in the local directory.

◆ list_remote()

[str] list_remote ( )
static

List all compatible resources from the online repository.

Returns
List of resources names.

◆ set_local_path()

set_local_path ( str  path,
bool   create = True 
)
static

Specify an absolute or relative path to the directory where the resources will be downloaded.

Pass false to the create parameter to prevent the directory from being created automatically. If the provided directory does not exist and creation is not allowed, the resources will be loaded into the aspose_data directory in the application's working directory.

Parameters
pathAbsolute or relative path to the directory.
createParameter to prevent the directory from being created automatically.

◆ set_repository()

set_repository ( str  url)
static

Specify the URL of the online repository from which Aspose.OCR resources will be downloaded.

By default, the resources are downloaded from https://github.com/aspose-ocr/resources/.

Parameters
urlURL of the online repository.