guesser

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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