matching

package
Version: v2.0.11+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: MIT, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATESEP_MATCHER_NAME        = "DATESEP"
	DATEWITHOUTSEP_MATCHER_NAME = "DATEWITHOUT"
)
View Source
const (
	DATE_RX_YEAR_SUFFIX    string = `((\d{1,2})(\s|-|\/|\\|_|\.)(\d{1,2})(\s|-|\/|\\|_|\.)(19\d{2}|200\d|201\d|\d{2}))`
	DATE_RX_YEAR_PREFIX    string = `((19\d{2}|200\d|201\d|\d{2})(\s|-|/|\\|_|\.)(\d{1,2})(\s|-|/|\\|_|\.)(\d{1,2}))`
	DATE_WITHOUT_SEP_MATCH string = `\d{4,8}`
)
View Source
const L33T_MATCHER_NAME = "l33t"
View Source
const REPEAT_MATCHER_NAME = "REPEAT"
View Source
const SEQUENCE_MATCHER_NAME = "SEQ"
View Source
const SPATIAL_MATCHER_NAME = "SPATIAL"

Variables

View Source
var (
	DICTIONARY_MATCHERS []match.Matcher
	MATCHERS            []match.Matcher
	ADJACENCY_GRAPHS    []adjacency.AdjacencyGraph
	L33T_TABLE          adjacency.AdjacencyGraph

	SEQUENCES map[string]string
)

Functions

func FilterDateSepMatcher

func FilterDateSepMatcher(m match.Matcher) bool

func FilterDateWithoutSepMatcher

func FilterDateWithoutSepMatcher(m match.Matcher) bool

func FilterL33tMatcher

func FilterL33tMatcher(m match.Matcher) bool

func FilterRepeatMatcher

func FilterRepeatMatcher(m match.Matcher) bool

func FilterSequenceMatcher

func FilterSequenceMatcher(m match.Matcher) bool

func FilterSpatialMatcher

func FilterSpatialMatcher(m match.Matcher) bool

func Omnimatch

func Omnimatch(password string, userInputs []string, filters ...func(match.Matcher) bool) (matches []match.Match)

Types

type DateMatchCandidate

type DateMatchCandidate struct {
	DayMonth string
	Year     string
	I, J     int
}

type DateMatchCandidateTwo

type DateMatchCandidateTwo struct {
	Day   string
	Month string
	Year  string
	I, J  int
}

Jump to

Keyboard shortcuts

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