Skip to content

v0.2.55..v0.2.56 changeset AddressNormalizer.h

Garret Voltz edited this page Aug 14, 2020 · 3 revisions
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/address/AddressNormalizer.h b/hoot-core/src/main/cpp/hoot/core/conflate/address/AddressNormalizer.h
index d9d09c8..d98f7e8 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/address/AddressNormalizer.h
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/address/AddressNormalizer.h
@@ -22,7 +22,7 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 
 #ifndef ADDRESS_NORMALIZER_H
@@ -30,6 +30,7 @@
 
 // Hoot
 #include <hoot/core/elements/Element.h>
+#include <hoot/core/conflate/address/AddressTagKeys.h>
 
 // Qt
 #include <QSet>
@@ -65,10 +66,23 @@ public:
 
   int getNumNormalized() const { return _numNormalized; }
 
+  AddressTagKeysPtr getAddressTagKeys() const { return _addressTagKeys; }
+
 private:
 
   mutable int _numNormalized;
 
+  AddressTagKeysPtr _addressTagKeys;
+
+  /*
+   * libpostal has a few weird quirks, so we have to hack the input address a bit (hopefully goes
+   * away at some point)
+   */
+  static void _prepareAddressForLibPostalNormalization(QString& address);
+
+  QSet<QString> _normalizeAddressWithLibPostal(const QString& address) const;
+  QSet<QString> _normalizeAddressIntersection(const QString& address) const;
+
   static bool _isValidNormalizedAddress(const QString& inputAddress,
                                         const QString& normalizedAddress);
 };
Clone this wiki locally