preprocess

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Annotation

func Annotation(bs []byte) int

Annotation returns index where unparsed part starts. In case if the full string can be parsed, returns returns the index of the end of the input.

func IsVirus

func IsVirus(bs []byte) bool

IsVirus returns if a string is a virus name.

func NoParse

func NoParse(bs []byte) bool

NoParse retuns if a string need to be parsed.

func NormalizeHybridChar

func NormalizeHybridChar(bs []byte) []byte

NormalizeHybridChar substitutes hybrid chars 'X' or 'x' with the multiplication sign char.

Types

type Preprocessor

type Preprocessor struct {
	Virus       bool
	NoParse     bool
	Approximate bool
	Annotation  bool
	Body        []byte
	Tail        []byte
}

func Preprocess

func Preprocess(bs []byte) *Preprocessor

Preprocess runs a series of regular expressions over the input to determine features of the input before parsing.

Jump to

Keyboard shortcuts

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