BrazilCitiesFilter 1.0.2
dotnet add package BrazilCitiesFilter --version 1.0.2
NuGet\Install-Package BrazilCitiesFilter -Version 1.0.2
<PackageReference Include="BrazilCitiesFilter" Version="1.0.2" />
<PackageVersion Include="BrazilCitiesFilter" Version="1.0.2" />
<PackageReference Include="BrazilCitiesFilter" />
paket add BrazilCitiesFilter --version 1.0.2
#r "nuget: BrazilCitiesFilter, 1.0.2"
#addin nuget:?package=BrazilCitiesFilter&version=1.0.2
#tool nuget:?package=BrazilCitiesFilter&version=1.0.2
BrazilCitiesFilter
✨ Overview
BrazilCitiesFilter is a lightweight and fast library for searching and correcting Brazilian city names based on a preprocessed binary dictionary with normalized names. Perfect for data validation, autocomplete, or any scenario where users may input city names with typos, missing accents, or inconsistent casing.
📦 Installation
Install via NuGet Package Manager:
dotnet add package BrazilCitiesFilter
Or via Visual Studio ➔ Manage NuGet Packages ➔ Search for BrazilCitiesFilter
.
🚀 Features
- 🔍 Fast lookup of cities using normalized name comparison.
- 🛠️ Automatic correction of misspelled or unformatted city names.
- ⚡ Optimized binary loading with MessagePack.
- 📚 Full access to the list of loaded cities.
⚡ Quick Start
using BrazilCitiesFilter;
ISearch search = new Search();
// Get all cities matching the name (normalized)
var cities = search.GetCitiesByName("sao paulo");
// Get only the first matching city
var city = search.GetFirstCityByName("SÃO PAULO");
// Correct a misspelled or unformatted name
var correctedName = search.CorrectTheCityName("rio de janero");
Console.WriteLine(correctedName); // Rio de Janeiro
📄 API Overview
Method / Property | Description |
---|---|
Cities |
Full list of all loaded cities. |
GetCitiesByName(name) |
Returns all cities that match the provided name (normalized). |
GetFirstCityByName(name) |
Returns the first city that matches the name. |
CorrectTheCityName(name) |
Returns the correct name of a city, or the original name if not found. |
📁 Requirements
- A
cities.bin
file containing city data serialized with MessagePack. - .NET 6.0 or later.
📝 License
This project is licensed under the MIT License.
BrazilCitiesFilter — intelligent and performant city name matching.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- MessagePack (>= 3.1.3)
- MessagePack.Annotations (>= 3.1.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.