address_normalizer.rb
# Given a CSV file, creates a new one with normalized addresses
# If there are malformed rows/errors, saves those to a separate output file
Given a CSV file, creates a new one with normalized addresses
If there are malformed rows/errors, saves those to a separate output file
Given a CSV file creates a new one with normalized addresses If there are malformed rows / errors saves those to a separate output file
def normalize_csv(filename)
    source_encoding = get_encoding(filename)
    process_csv(filename, source_encoding)
    handle_malformed_rows unless malformed_rows.empty?
    puts "Done!"
  end
def normalize_csv ( filename ) source_encoding = get_encoding ( filename ) process_csv ( filename , source_encoding ) handle_malformed_rows unless malformed_rows . empty? puts "Done!" end
Given a CSV file, creates a new one with normalized addresses
If there are malformed rows/errors, saves those to a separate output file
Given a CSV file creates a new one with normalized addresses If there are malformed rows / errors saves those to a separate output file
# Check encoding # normalize_file # If there were problem rows, print them to the user and save them to a file
filename