-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell binding for the libpostal library -- -- Provides an interface for the libpostal NLP library @package haskell-postal @version 0.2.1.2 -- | Provides an interface for the libpostal NLP library module NLP.Postal -- | Phantom type for a Ptr containing address parser options data AddressParserOptions -- | Phantom type for a Ptr containing options for the normalizer data NormalizeOptions -- | Calls libpostal_setup() to set up the library Make sure you call this -- before anything else setup :: IO Int -- | Calls libpostal_setup_parser() to set up the address parser Call this -- before trying to parse addresses setupParser :: IO Int -- | Calls libpostal_setup_language_classifier() to set up the classifier -- Call this before doing address normaliation setupLanguageClassifier :: IO Int -- | Returns default parser options returned by -- libpostal_get_address_parser_default_options() getAddressParserDefaultOptions :: IO (Ptr AddressParserOptions) -- | Returns default normalizer options returned by -- libpostal_get_default_options() getDefaultNormalizeOptions :: IO (Ptr NormalizeOptions) -- | Parse an address Calls libpostal_parse_address() to parse an address -- and returns the parsed parts as a list of key-value tuples (an -- association list). parseAddress :: Ptr AddressParserOptions -> Text -> IO [(Text, Text)] -- | Returns the expansion of an address Calls libpostal_expand_address() -- to normalize an address and return the list of normalized addresses. expandAddress :: Ptr NormalizeOptions -> Text -> IO [Text] -- | Calls libpostal_teardown_parser() tearDownParser :: IO () -- | Calls libpostal_teardown_language_classifier() tearDownLanguageClassifier :: IO () -- | Calls libpostal_teardown() tearDown :: IO ()