guesser

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GuessEncoding added in v0.5.0

func GuessEncoding(ctx context.Context, d *processor.Document) error

func RegisterDocumentFormatGuesser

func RegisterDocumentFormatGuesser(g DocumentFormatGuesser, name string) error

func RegisterDocumentTypeGuesser

func RegisterDocumentTypeGuesser(g DocumentTypeGuesser, name string) error

Types

type DocumentFormatGuesser

type DocumentFormatGuesser interface {
	// GuessFormat returns the format type guessed to processor.FormatUnknown if
	// it is unable to.
	GuessFormat(blob []byte) processor.FormatType
}

DocumentFormatGuesser guesses the format of the document given a blob

type DocumentTypeGuesser

type DocumentTypeGuesser interface {
	// GuessDocumentType returns the document type guessed or processor.DocumentUnknown if
	// it is unable to. Format provided may be processor.FormatUnknown.
	GuessDocumentType(blob []byte, format processor.FormatType) processor.DocumentType
}

DocumentTypeGuesser guesses the document type based on the blob and format given

type IngestPredicatesGuesser added in v0.1.1

type IngestPredicatesGuesser struct{}

func (*IngestPredicatesGuesser) GuessDocumentType added in v0.1.1

func (_ *IngestPredicatesGuesser) GuessDocumentType(blob []byte, format processor.FormatType) processor.DocumentType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL