expand

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddressNone        = C.LIBPOSTAL_ADDRESS_NONE
	AddressAny         = C.LIBPOSTAL_ADDRESS_ANY
	AddressName        = C.LIBPOSTAL_ADDRESS_NAME
	AddressHouseNumber = C.LIBPOSTAL_ADDRESS_HOUSE_NUMBER
	AddressStreet      = C.LIBPOSTAL_ADDRESS_STREET
	AddressUnit        = C.LIBPOSTAL_ADDRESS_UNIT
	AddressLevel       = C.LIBPOSTAL_ADDRESS_LEVEL
	AddressStaircase   = C.LIBPOSTAL_ADDRESS_STAIRCASE
	AddressEntrance    = C.LIBPOSTAL_ADDRESS_ENTRANCE
	AddressCategory    = C.LIBPOSTAL_ADDRESS_CATEGORY
	AddressNear        = C.LIBPOSTAL_ADDRESS_NEAR
	AddressToponym     = C.LIBPOSTAL_ADDRESS_TOPONYM
	AddressPostalCode  = C.LIBPOSTAL_ADDRESS_POSTAL_CODE
	AddressPoBox       = C.LIBPOSTAL_ADDRESS_PO_BOX
	AddressAll         = C.LIBPOSTAL_ADDRESS_ALL
)

Variables

View Source
var ErrSetup = errors.New("could not load libpostal")

Functions

func ExpandAddress

func ExpandAddress(address string) []string

func ExpandAddressOptions

func ExpandAddressOptions(address string, options ExpandOptions) []string

func Setup

func Setup() error

Types

type ExpandOptions

type ExpandOptions struct {
	Languages              []string
	AddressComponents      uint16
	LatinAscii             bool
	Transliterate          bool
	StripAccents           bool
	Decompose              bool
	Lowercase              bool
	TrimString             bool
	ReplaceWordHyphens     bool
	DeleteWordHyphens      bool
	ReplaceNumericHyphens  bool
	DeleteNumericHyphens   bool
	SplitAlphaFromNumeric  bool
	DeleteFinalPeriods     bool
	DeleteAcronymPeriods   bool
	DropEnglishPossessives bool
	DeleteApostrophes      bool
	ExpandNumex            bool
	RomanNumerals          bool
}

func GetDefaultExpansionOptions

func GetDefaultExpansionOptions() ExpandOptions

Jump to

Keyboard shortcuts

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