API for extracting data from documents.

Methods

  • Clears the accumulated results. Should be called after a document has been recognized to the customers satisfaction to prevent a poisoned cache.

    Returns Promise<void>

  • Frees up any resources associated with this object. No other methods may be called on this object after destroy has been called.

    Returns Promise<void>

  • Parameters

    • workerBridge: WorkerBridge
    • Optional configuration: {
          configurations?: ({
              fieldTypeName?: string;
              maxYear?: number;
              minYear?: number;
          } & {
              _type: "DateValidationConfiguration";
          } | {
              expectedCountry?: EuropeanHealthInsuranceCardIssuingCountry;
          } & {
              _type: "EuropeanHealthInsuranceCardConfiguration";
          } | {
              acceptedCountries?: string[];
              acceptedMRZTypes?: MrzDocumentType[];
          } & {
              _type: "MRZFallbackConfiguration";
          } | {
              sensitivityThreshold?: number;
          } & {
              _type: "AutoFocusConfiguration";
          } | {
              glareDetectionThreshold?: number;
          } & {
              _type: "GlareDetectionConfiguration";
          } | {
              acceptedDocumentTypes?: string[];
          } & {
              _type: "DocumentDataExtractorCommonConfiguration";
          })[];
          documentTrustMode?: DocumentTrustMode;
          fieldExcludeList?: string[];
          processingMode?: ProcessingMode;
          resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; };
          returnCrops?: boolean;
      }
      • Optional configurations?: ({
            fieldTypeName?: string;
            maxYear?: number;
            minYear?: number;
        } & {
            _type: "DateValidationConfiguration";
        } | {
            expectedCountry?: EuropeanHealthInsuranceCardIssuingCountry;
        } & {
            _type: "EuropeanHealthInsuranceCardConfiguration";
        } | {
            acceptedCountries?: string[];
            acceptedMRZTypes?: MrzDocumentType[];
        } & {
            _type: "MRZFallbackConfiguration";
        } | {
            sensitivityThreshold?: number;
        } & {
            _type: "AutoFocusConfiguration";
        } | {
            glareDetectionThreshold?: number;
        } & {
            _type: "GlareDetectionConfiguration";
        } | {
            acceptedDocumentTypes?: string[];
        } & {
            _type: "DocumentDataExtractorCommonConfiguration";
        })[]

        List of configuration elements for the document data extractor.

        Default Value

        [new DocumentDataExtractorCommonConfiguration({})];
        
      • Optional documentTrustMode?: DocumentTrustMode

        Level of trust in the authenticity of the extracted document.

        Default Value

        "TRUSTED";
        
      • Optional fieldExcludeList?: string[]

        Normalized names of the fields to exclude from the result.

        Default Value

        [];
        
      • Optional processingMode?: ProcessingMode

        Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it.

        On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject.

        Default Value

        "AUTO";
        
      • Optional resultAccumulationConfig?: { confirmationMethod?: ConfirmationMethod; minConfirmations?: number; minConfidenceForStableField?: number; autoClearThreshold?: number; }

        Configuration for how to accumulate results.

        Default Value

        new ResultAccumulationConfiguration({});
        
      • Optional returnCrops?: boolean

        If true, crops of the detected documents and fields will be returned in the result.

        Default Value

        false;
        

    Returns Promise<DocumentDataExtractor>

Generated using TypeDoc