def to_canonical_s
      parts = []
      parts << self.number.upcase if self.number
      parts << StreetAddress.string_for(self.pre_direction, :short).upcase if self.pre_direction
      parts << StreetAddress.string_for(StreetAddress.find_token(self.ordinal, ORDINALS), :short).upcase if self.ordinal
      canonical_name = self.name.gsub(/[(,?!\'":.#)]/, '').gsub(PO_BOX_PATTERN, 'PO BOX').upcase if self.name
      canonical_name.gsub!(/(rr|r.r.)/i, 'RR') if canonical_name =~ RR_PATTERN 
      # remove the original ordinal and box from the name, they are output in canonical form separately
      canonical_name.gsub!(self.ordinal.upcase, '') if self.ordinal
      canonical_name.gsub!(self.box_number, '') if self.box_number
      parts << canonical_name.chomp(' ') if canonical_name
      parts << self.box_number if self.box_number
      parts << StreetAddress.string_for(self.suffix, :short).upcase if self.suffix
      parts << StreetAddress.string_for(self.post_direction, :short).upcase if self.post_direction
      # make all unit type as the canoncial number "#"
      parts << StreetAddress.string_for(:number, :short).upcase if self.unit_type
      parts << self.unit.upcase if self.unit
      parts.delete('')
      parts.join(' ')      
    end
def to_canonical_s
      parts = []
      parts << self.number.upcase if self.number
      parts << StreetAddress.string_for(self.pre_direction, :short).upcase if self.pre_direction
      parts << StreetAddress.string_for(StreetAddress.find_token(self.ordinal, ORDINALS), :short).upcase if self.ordinal
      canonical_name = self.name.gsub(/[(,?!\'":.#)]/, '').gsub(PO_BOX_PATTERN, 'PO BOX').upcase if self.name
      canonical_name.gsub!(/(rr|r.r.)/i, 'RR') if canonical_name =~ RR_PATTERN 
      # remove the original ordinal and box from the name, they are output in canonical form separately
      canonical_name.gsub!(self.ordinal.upcase, '') if self.ordinal
      canonical_name.gsub!(self.box_number, '') if self.box_number
      parts << canonical_name.chomp(' ') if canonical_name
      parts << self.box_number if self.box_number
      parts << StreetAddress.string_for(self.suffix, :short).upcase if self.suffix
      parts << StreetAddress.string_for(self.post_direction, :short).upcase if self.post_direction
      # make all unit type as the canoncial number "#"
      parts << StreetAddress.string_for(:number, :short).upcase if self.unit_type
      parts << self.unit.upcase if self.unit
      parts.delete('')
      parts.join(' ')      
    end
to_canonical_s
 format the address in a postal service canonical format