EasyPersianNormalizer 1.0.0
dotnet add package EasyPersianNormalizer --version 1.0.0
NuGet\Install-Package EasyPersianNormalizer -Version 1.0.0
<PackageReference Include="EasyPersianNormalizer" Version="1.0.0" />
<PackageVersion Include="EasyPersianNormalizer" Version="1.0.0" />
<PackageReference Include="EasyPersianNormalizer" />
paket add EasyPersianNormalizer --version 1.0.0
#r "nuget: EasyPersianNormalizer, 1.0.0"
#addin nuget:?package=EasyPersianNormalizer&version=1.0.0
#tool nuget:?package=EasyPersianNormalizer&version=1.0.0
EasyPersianNormalizer
EasyPersianNormalizer
is persian text normalizer
Table of Contents
1. Overview
A EasyPersianNormalizer
is persian text normalizer
2. Key Features
1. Trim
- Description: Removes extra whitespace at the beginning and end of the text.
- Type:
bool
- Default:
true
- Use Case: Helps in cleaning text input by removing leading and trailing spaces.
2. Remove Diacritics
- Description: Strips diacritical marks (like accents) from Persian characters.
- Type:
bool
- Default:
true
- Use Case: Ensures that text is uniform for comparison and search, disregarding variations in diacritical marks.
3. Convert Arabic Ye and Ke to Persian
- Description: Converts Arabic "ی" and "ک" characters to their Persian equivalents.
- Type:
bool
- Default:
true
- Use Case: Standardizes Persian and Arabic text for consistency.
4. Change to Half Space
- Description: Converts full-width spaces to half-width spaces, which is common in Persian writing for better readability.
- Type:
bool
- Default:
true
- Use Case: Corrects the spacing between words for more natural text formatting.
5. Remove More Dash
- Description: Removes additional or incorrect dash characters from the text.
- Type:
bool
- Default:
true
- Use Case: Ensures that dashes are used properly in the text.
6. Remove More Dot
- Description: Removes excess or incorrect dot characters from the text.
- Type:
bool
- Default:
true
- Use Case: Ensures proper punctuation and readability.
7. Convert English Quotes to Persian
- Description: Converts English-style quotation marks (") to Persian-style quotation marks (either
“”
or«»
). - Type:
bool
- Default:
true
- Use Case: Standardizes the use of quotation marks for consistent formatting in Persian text.
8. Remove Extra Marks
- Description: Removes extra punctuation marks like
؟
and!
from the text. - Type:
bool
- Default:
true
- Use Case: Cleans up text by removing unnecessary punctuation.
9. Remove Keshide
- Description: Converts stretched Persian characters (like "کشیده") back to normal characters.
- Type:
bool
- Default:
true
- Use Case: Ensures consistent and clean text for processing.
10. Remove Spacing and Line Breaks
- Description: Removes unnecessary spaces and line breaks.
- Type:
bool
- Default:
true
- Use Case: Cleans up the text by removing redundant line breaks and spaces.
11. Outside-Inside Spacing
- Description: Adjusts spacing inside and outside of parentheses, brackets, and other punctuation marks like
()
,[]
,{}
,“”
, and«»
. - Type:
bool
- Default:
true
- Use Case: Standardizes punctuation spacing for better readability and consistency.
12. Remove Hexadecimal Symbols
- Description: Removes invisible or special characters that may be encoded as hexadecimal symbols.
- Type:
bool
- Default:
true
- Use Case: Cleans up the text by removing non-visible or corrupt characters that might have been added due to encoding issues.
13. Number Conversion
- Description: Converts numbers between Persian and English formats.
- Type:
NumberConvertorType
- Default:
NumberConvertorType.ToEnglish
- Possible Values:
ToPersian
: Converts numbers to Persian digits.ToEnglish
: Converts numbers to English digits.None
: Leaves numbers unchanged.
- Use Case: Provides flexibility in handling Persian and English number formats based on the application's needs.
3. Installation
You can install the EasyPersianNormalizer
package from NuGet Package Manager:
NuGet Package Manager
bash
Copy code
Install-Package EasyPersianNormalizer
.NET CLI
You can also use the .NET CLI to install the package:
bash
Copy code
dotnet add package EasyPersianNormalizer
Once installed, you can start using the NormalizerText
classes in your application.
4. Example
var yourText = "این متن من است";
var result = yourText.NormalizerText();
var result1 = yourText.NormalizerText(new NormalizerConfig());
5. Contributing
We welcome contributions to the EasyPersianNormalizer
project! If you'd like to contribute, please fork the repository and submit a pull request with your proposed changes.
Steps to Contribute
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Implement your changes, ensuring that all unit tests pass.
- Submit a pull request for review.
6. Frequently Asked Questions (FAQ)
Q1: Can I use EasyPersianNormalizer
in a highly concurrent environment?
- yes you can
Q2: What is the best use case for a EasyPersianNormalizer
?
- you can use it to save name of product on db storage and also for search on your website
7. License
This project is licensed under the MIT License. See the LICENSE file for more details.
Feel free to modify or use it as part of your project
Product | Versions 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. 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. |
.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 is compatible. 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. |
-
.NETFramework 4.6.2
- No dependencies.
-
.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.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 153 | 4/7/2025 |
EasyPersianNormalizer