Skip to main content
AI tutorials

Humanize AI-Generated Text with the Open-Source text-Humanizer Pipeline

Learn how to install, configure, and run text-Humanizer, an open-source Python project that rewrites AI-generated content with more natural structures and varied phrasing while preserving its meaning across supported languages.

Humanize AI-Generated Text with the Open-Source text-Humanizer Pipeline

What is text-Humanizer?

text-Humanizer is a free, MIT-licensed Python project for transforming AI-generated text into writing with more natural sentence structures, varied linguistic patterns, and greater stylistic diversity. It uses a multilingual rewriting and translation pipeline designed to retain the source text's meaning.

The project supports the language codes en, ja, zh, ko, de, fr, and es. Its README also states that the rewritten content can bypass many AI detectors. Detection results are not guaranteed, however, and the tool should be used responsibly rather than to misrepresent authorship or evade disclosure requirements.

Key features

  • Meaning preservation: Rewrites content while attempting to retain its original semantics.
  • Natural phrasing: Introduces different sentence structures, expressions, and information flow.
  • Multilingual processing: Accepts and produces content in several supported languages.
  • Style flexibility: Designed to adapt rewriting to different tones and writing styles.
  • Optional DeepL stage: Adds another translation engine when a DeepL API key is configured.
  • Open-source access: Distributed under the MIT License.

How the rewriting pipeline works

text-Humanizer multilingual rewriting pipeline

Instead of applying a single paraphrasing pass, text-Humanizer moves the content through several language-model and translation stages.

  1. DeepSeek rewrite: DeepSeek creates a semantically equivalent version with modified phrasing, sentence structure, and information flow. The pipeline also uses Chinese as an intermediate representation to introduce structural variation.
  2. Translation into Turkish: Google Translate converts the intermediate output into Turkish, adding cross-language syntactic variation.
  3. Optional Japanese translation: If a DeepL API key is available, DeepL translates the Turkish text into Japanese. This introduces a second translation engine and additional linguistic variation.
  4. Final reconstruction: DeepSeek translates and reconstructs the result in the configured original language, removing translation artifacts and restoring readable sentence flow.

Because multiple transformations are involved, review the final text carefully. Names, technical terms, numbers, quotations, and subtle distinctions may need manual verification.

Prerequisites

Before installing the project, prepare the following:

  • Python 3.6 or later.
  • Git for cloning the repository.
  • A DeepSeek API key.
  • An optional DeepL API key if you want to enable the additional translation stage.

Installation

1. Clone the repository

git clone https://github.com/SpaceDudem/text-humanizer.git
cd text-humanizer

2. Install the Python dependencies

pip install -r requirements.txt

If your environment maps Python 3 to a separate command, use the corresponding package installer, such as pip3.

3. Create the configuration file

On Windows, copy the example configuration with:

copy .\config\config.example.toml .\config.toml

On Linux or macOS, use:

cp ./config/config.example.toml ./config.toml

This creates the root-level config.toml file used by the application.

Configure text-Humanizer

Open config.toml and set the options required by your API provider and target language.

  • target_language: Language used for the input and output. Available codes listed by the project are en, ja, zh, ko, de, fr, and es.
  • deepseek_api_key: Your required DeepSeek API key.
  • deepl_api_key: An optional DeepL API key for the Turkish-to-Japanese translation stage.
  • base_url: An API base URL override. Leave it empty to use the provider default.
  • model: The desired model slug. Leave it empty to use the provider default.
  • temperature: Controls variation in the LLM output. The project recommends 1.3.

A conceptual configuration may look like this:

target_language = "en"
deepseek_api_key = "YOUR_DEEPSEEK_API_KEY"
deepl_api_key = ""
base_url = ""
model = ""
temperature = 1.3

Use the precise formatting already present in config.example.toml. Replace the placeholder key with your real credential, and do not commit config.toml

Run the humanizer

Start the application from the repository directory:

python main.py

If necessary, use python3 main.py instead. Provide the text through the interface exposed by the running application, then allow the configured pipeline to perform its rewrite and translation stages.

Basic usage example

For an English workflow, set target_language to en, provide a valid DeepSeek key, and run main.py. You could then process a rigid sentence such as:

The implementation of this system provides users with the ability to rewrite content in a more natural manner.

The pipeline should return a semantically similar version with altered phrasing and sentence flow. The exact result is nondeterministic and depends on the selected model, temperature, translation stages, and API behavior.

Advanced configuration tips

Enable the optional DeepL stage

Add a valid value for deepl_api_key to include the Turkish-to-Japanese translation step. Leave it empty if you prefer the pipeline without DeepL. Compare both modes on representative text because an additional translation pass may increase linguistic variation while also creating more details to verify.

Adjust output variation

The README recommends a temperature of 1.3. This setting is intended to encourage more diverse wording. When experimenting with temperature, test one change at a time and compare whether the result still preserves names, facts, and domain-specific terminology.

Select a model or custom endpoint

Set model when you need a particular provider-supported model slug. Set base_url only when you need to override the default API endpoint. Otherwise, leave both values empty so the provider defaults are used.

Test long or specialized content in sections

For technical, legal, academic, or data-heavy material, review smaller sections individually. Multistage rewriting can affect precise terminology or relationships even when semantic preservation is the goal. Compare every final section with its source before publication.

Troubleshoot configuration issues

  • Confirm that the commands are being run from the cloned text-humanizer directory.
  • Check that config.toml exists at the expected root location.
  • Verify that deepseek_api_key contains a valid key.
  • Make sure target_language uses one of the supported language codes.
  • If the optional stage fails, check the deepl_api_key or temporarily leave it empty.
  • When using custom API settings, verify the base_url and model values.

Conclusion

text-Humanizer combines DeepSeek rewriting with cross-language translation to produce more varied, natural-sounding text while attempting to preserve the original meaning. After installing the dependencies and configuring the API keys, you can launch the workflow with python main.py. Treat its output as a draft, verify important details, and use the project in accordance with applicable authorship and disclosure rules.