Class: AtlasEngine::Au::ValidationTranscriber::AddressParser

Inherits:
ValidationTranscriber::AddressParserBase show all
Defined in:
app/countries/atlas_engine/au/validation_transcriber/address_parser.rb

Constant Summary collapse

UNIT_TYPE_KEYWORDS =

Temporary till we fix constants loading for AddressParsers Source: meteor.aihw.gov.au/content/429004

T.let(
  Set.new([
    "ant",
    "apt",
    "atm",
    "bbq",
    "btsd",
    "bldg",
    "bngw",
    "cage",
    "carp",
    "cars",
    "club",
    "cool",
    "ctge",
    "dupl",
    "fcty",
    "flat",
    "grge",
    "hall",
    "hse",
    "ksk",
    "lse",
    "lbby",
    "loft",
    "lot",
    "msnt",
    "mbth",
    "offc",
    "resv",
    "room",
    "shed",
    "shop",
    "shrm",
    "sign",
    "site",
    "stll",
    "stor",
    "str",
    "stu",
    "subs",
    "se",
    "tncy",
    "twr",
    "tnhs",
    "unit",
    "vlt",
    "vlla",
    "ward",
    "whse",
    "wksh",
  ]),
  T::Set[String],
)

Constants inherited from ValidationTranscriber::AddressParserBase

ValidationTranscriber::AddressParserBase::AddressComponents, ValidationTranscriber::AddressParserBase::BUILDING_NAME, ValidationTranscriber::AddressParserBase::BUILDING_NUM, ValidationTranscriber::AddressParserBase::NON_NUMERIC_STREET, ValidationTranscriber::AddressParserBase::NUMERIC_ONLY_BUILDING_NUM, ValidationTranscriber::AddressParserBase::PO_BOX, ValidationTranscriber::AddressParserBase::STREET, ValidationTranscriber::AddressParserBase::STREET_NO_COMMAS, ValidationTranscriber::AddressParserBase::UNIT_NUM, ValidationTranscriber::AddressParserBase::UNIT_NUM_NO_HYPHEN, ValidationTranscriber::AddressParserBase::UNIT_TYPE

Instance Method Summary collapse

Methods inherited from ValidationTranscriber::AddressParserBase

#initialize, #parse

Methods included from ValidationTranscriber::Formatter

#build_address, #strip_trailing_punctuation, #strip_word

Constructor Details

This class inherits a constructor from AtlasEngine::ValidationTranscriber::AddressParserBase

Instance Method Details

#country_regex_formatsObject



66
67
68
69
70
# File 'app/countries/atlas_engine/au/validation_transcriber/address_parser.rb', line 66

def country_regex_formats
  @country_regex_formats ||= [
    /(#{unit_regex})?#{bldg_num_regex}\s+#{street_regex}/i,
  ]
end