Group
Show / Hide Table of Contents

Class BatchParser

A utility to parse batches of files.

Inheritance
System.Object
BatchParser
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Textkernel.Tx.Batches
Assembly: Textkernel.Tx.SDK.dll
Syntax
public class BatchParser

Methods

| Improve this Doc View Source

ParseJobs(TxClient, ParseOptions, BatchParsingRules, String, SearchOption, Func<JobBatchSuccessResult, Task>, Func<JobBatchPartialSuccessResult, Task>, Func<BatchErrorResult, Task>, Func<String, String>)

Parses a batch of jobs

Declaration
public static async Task ParseJobs(TxClient apiClient, ParseOptions parseOptions, BatchParsingRules rules, string directory, SearchOption searchOption, Func<JobBatchSuccessResult, Task> successCallback, Func<JobBatchPartialSuccessResult, Task> partialSuccessCallback, Func<BatchErrorResult, Task> errorCallback, Func<string, string> generateDocumentIdFn = null)
Parameters
Type Name Description
TxClient apiClient

The API client to use to parse the files

ParseOptions parseOptions

Any parsing/indexing options

BatchParsingRules rules

The rules that should be applied to whatever files are found prior to parsing. This is important to reduce the number of invalid parse API calls and reduce parsing costs.

System.String directory

The directory containing the files to be parsed

System.IO.SearchOption searchOption
System.Func<JobBatchSuccessResult, System.Threading.Tasks.Task> successCallback

A callback for when a file is parsed successfully

System.Func<JobBatchPartialSuccessResult, System.Threading.Tasks.Task> partialSuccessCallback

A callback for when some error happened during/after parsing, but there is still usable data in the response

System.Func<BatchErrorResult, System.Threading.Tasks.Task> errorCallback

A callback for when an error occurred when parsing the file, and there is no usable data

System.Func<System.String, System.String> generateDocumentIdFn

A callback so you can specify a DocumentId for each file that is parsed

Returns
Type Description
System.Threading.Tasks.Task
Exceptions
Type Condition
TxInvalidBatchException

Thrown when the directory provided does not meet the BatchParsingRules

| Improve this Doc View Source

ParseResumes(TxClient, ParseOptions, BatchParsingRules, String, SearchOption, Func<ResumeBatchSuccessResult, Task>, Func<ResumeBatchPartialSuccessResult, Task>, Func<BatchErrorResult, Task>, Func<String, String>)

Parses a batch of resumes

Declaration
public static async Task ParseResumes(TxClient apiClient, ParseOptions parseOptions, BatchParsingRules rules, string directory, SearchOption searchOption, Func<ResumeBatchSuccessResult, Task> successCallback, Func<ResumeBatchPartialSuccessResult, Task> partialSuccessCallback, Func<BatchErrorResult, Task> errorCallback, Func<string, string> generateDocumentIdFn = null)
Parameters
Type Name Description
TxClient apiClient

The API client to use to parse the files

ParseOptions parseOptions

Any parsing/indexing options

BatchParsingRules rules

The rules that should be applied to whatever files are found prior to parsing. This is important to reduce the number of invalid parse API calls and reduce parsing costs.

System.String directory

The directory containing the files to be parsed

System.IO.SearchOption searchOption
System.Func<ResumeBatchSuccessResult, System.Threading.Tasks.Task> successCallback

A callback for when a file is parsed successfully

System.Func<ResumeBatchPartialSuccessResult, System.Threading.Tasks.Task> partialSuccessCallback

A callback for when some error happened during/after parsing, but there is still usable data in the response

System.Func<BatchErrorResult, System.Threading.Tasks.Task> errorCallback

A callback for when an error occurred when parsing the file, and there is no usable data

System.Func<System.String, System.String> generateDocumentIdFn

A callback so you can specify a DocumentId for each file that is parsed

Returns
Type Description
System.Threading.Tasks.Task
Exceptions
Type Condition
TxInvalidBatchException

Thrown when the directory provided does not meet the BatchParsingRules

  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾