Geo::StreetAddress::US creates a list of keys to check and normalize. In the normalize_address function it goes through those keys and normalizes the values. This port is currently missing that normalization. This PR adds that normalizer.
Because the normalizer changes the output of the function, I had to update the test.js file to reflect the changes. To ensure the new test cases matched what the PERL library would output, I created the values by calling the perl library directly for all the addresses. After I did this I noticed plus4 was missing from the perl library. I manually altered the data that PERL created to add plus4.
With the new tests, the punctuation parser was failing because it converted "S.E." to "SE.". The output from the PERL library was "SE". This seems to be because the punctuation regex was different between this port and the PERL library. I updated the regex so they are both the same, and this test case was resolved.
Lastly, PERL does not support the street type 'Row'. The test case for Row was manually updated to work for this library, and not be what the PERL library outputs.
Geo::StreetAddress::US creates a list of keys to check and normalize. In the normalize_address function it goes through those keys and normalizes the values. This port is currently missing that normalization. This PR adds that normalizer.
Because the normalizer changes the output of the function, I had to update the test.js file to reflect the changes. To ensure the new test cases matched what the PERL library would output, I created the values by calling the perl library directly for all the addresses. After I did this I noticed
plus4
was missing from the perl library. I manually altered the data that PERL created to addplus4
.With the new tests, the punctuation parser was failing because it converted "S.E." to "SE.". The output from the PERL library was "SE". This seems to be because the punctuation regex was different between this port and the PERL library. I updated the regex so they are both the same, and this test case was resolved.
Lastly, PERL does not support the street type 'Row'. The test case for Row was manually updated to work for this library, and not be what the PERL library outputs.