AiTextCleaner.FormattingResidue 0.2.0

dotnet add package AiTextCleaner.FormattingResidue --version 0.2.0
                    
NuGet\Install-Package AiTextCleaner.FormattingResidue -Version 0.2.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="AiTextCleaner.FormattingResidue" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AiTextCleaner.FormattingResidue" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="AiTextCleaner.FormattingResidue" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AiTextCleaner.FormattingResidue --version 0.2.0
                    
#r "nuget: AiTextCleaner.FormattingResidue, 0.2.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.
#:package AiTextCleaner.FormattingResidue@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AiTextCleaner.FormattingResidue&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=AiTextCleaner.FormattingResidue&version=0.2.0
                    
Install as a Cake Tool

aitextcleaner-formatting-residue

aitextcleaner-formatting-residue is a lightweight, deterministic Python library designed to clean common artifacts left behind when copying text from web pages, document editors, or generated text exports. It operates entirely locally with no external dependencies or network requests.

What It Does

  • Strips basic copied HTML block tags and markup wrappers.
  • Normalizes typographic punctuation residue (such as stray formatting quotes and dashes).
  • Collapses repeated blank lines and removes trailing whitespace.

What It Does Not Do

  • It does not detect AI-generated writing or analyze text semantics.
  • It does not guarantee originality, bypass detection tools, or rewrite content.
  • It only applies deterministic formatting cleanup to the string provided.

Python API Usage

The library exposes a single function: clean_formatting_residue(text: str).

from aitextcleaner_formatting_residue import clean_formatting_residue

raw_text = "<div><p>Sample text with trailing spaces.   \n\n\n\nNext line.</p></div>"
cleaned = clean_formatting_residue(raw_text)
print(cleaned)

Command-Line Interface

The CLI reads from standard input or an optional positional UTF-8 file argument and outputs the cleaned result directly to standard output:

# Read from a file argument
aitextcleaner-formatting-residue input.txt

# Read from standard input
cat input.txt | aitextcleaner-formatting-residue

All processing occurs offline in memory; no network calls are made.

Testing

You can run the test suite locally using pytest:

pytest

For additional context on text cleanup patterns and web tools, visit the AI Text Cleaner web utility. Package metadata and repository links may also point to this project homepage.

License

This project is distributed under the MIT License.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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
0.2.0 108 8/30/2026