ProjectUsNormalizer 0.1.0

dotnet add package ProjectUsNormalizer --version 0.1.0                
NuGet\Install-Package ProjectUsNormalizer -Version 0.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ProjectUsNormalizer" Version="0.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ProjectUsNormalizer --version 0.1.0                
#r "nuget: ProjectUsNormalizer, 0.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ProjectUsNormalizer as a Cake Addin
#addin nuget:?package=ProjectUsNormalizer&version=0.1.0

// Install ProjectUsNormalizer as a Cake Tool
#tool nuget:?package=ProjectUsNormalizer&version=0.1.0                

Project US@ Normalizer

C# library to facilitate address normalization in accordance with Project US@, the "Unified Specification for Addresses in Health Care".

NOTE: This package doesn't validate the existence of an address, it only normalizes fields based on the rules of Project US@ specification.

Usage

Normalize All Address Fields

Address address = new (
  StreetAddress1: "123    Church Pky Avenue West \n",
  StreetAddress2: "Suite 101",
  City: "@Spring \t Hill",
  State: "Tennessee",
  PostalCode: "12345-0123"
);
Address normalizedAddress = address.Normalize();

// The output of normalizedAddress:
// new Address("123 CHURCH PARKWAY AVE W", "STE 101", "SPRING HILL", "TN", "12345-0123")

Normalize Individual Address Fields

Normalize Street Line
string streetLine = "1011 South West Main Thing St North East Apartment 280";
string normalizedStreetLine = streetLine.NormalizeStreetLine();

// The output of normalizedStreetLine:
// "1011 SW MAIN THING ST NE APT 280"

See StreetLineNormalizerTests unit tests for more examples.

Normalize State
string state = "  \nTennessee";
string normalizedState = state.NormalizeState();

// The output of normalizedState:
// "TN"

Parse Street Line Into Individual Components

StreetLineParser is able to parse a given street line into normalized individual street components.

string streetLine = "101 South West Main Thing St North East Apartment 12";
IEnumerable<StreetComponent> parsedStreetComponents = StreetLineParser.Parse(streetLine);

// The output of parsedStreetComponents:
// new List<StreetComponent>
// {
//   new("101", StreetComponentType.PrimaryAddressNumber),
//   new("SW", StreetComponentType.Predirectional),
//   new("MAIN THING", StreetComponentType.StreetName),
//   new("ST", StreetComponentType.Suffix),
//   new("NE", StreetComponentType.Postdirectional),
//   new("APT", StreetComponentType.SecondaryAddressIdentifier),
//   new("12", StreetComponentType.SecondaryAddress)
// }

Installation

Install ProjectUsNormalizer as a NuGet package, via an IDE package manager, or using the command-line instructions at Install-Package ProjectUsNormalizer.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.