Business Card V1

Sample Code:

class BusinessCardV1(raw_prediction)

Business Card API version 1 inference prediction.

static get_endpoint_info(klass)

Retrives the endpoint information for an Inference.

Should never retrieve info for CustomV1, as a custom endpoint should be created to use CustomV1.

Parameters:

klass (Type[Inference]) – product subclass to access endpoint information.

Return type:

Dict[str, str]

endpoint_name: Optional[str] = 'business_card'

Name of the endpoint.

endpoint_version: Optional[str] = '1'

Version of the endpoint.

is_rotation_applied: Optional[bool]

Whether the document has had any rotation applied to it.

page_id: Optional[int]

Optional page id for page-level predictions.

pages: List[Page[BusinessCardV1Document]]

Page-level prediction(s).

prediction: BusinessCardV1Document

Document-level prediction.

product: Product

Name and version of a given product, as sent back by the API.

class BusinessCardV1Document(raw_prediction, page_id=None)

Business Card API version 1.0 document data.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

address: StringField

The address of the person.

company: StringField

The company the person works for.

email: StringField

The email address of the person.

fax_number: StringField

The Fax number of the person.

firstname: StringField

The given name of the person.

job_title: StringField

The job title of the person.

lastname: StringField

The lastname of the person.

mobile_number: StringField

The mobile number of the person.

phone_number: StringField

The phone number of the person.

social_media: List[StringField]

The social media profiles of the person or company.

website: StringField

The website of the person or company.