Skip to content

Nordth/humanize-ai-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Humanize AI Lib

NPM Version

Why Clean Up GPT Text?

AI-generated content often contains subtle markers that make it obvious to readers (and algorithms) that the text wasn't written by a human:

Em-dashes (—) instead of regular dash (-) Fancy quotes (“ ”) instead of standard ones (") Unnecessary whitespace or hidden Unicode characters And other symbols Cleaning these up makes the text flow more naturally, improving readability and keeping readers engaged.

This package contains humanization function used on http://humanize-ai.click/

Usage

Usage is simple:

import { humanizeString } from 'humanize-ai-lib';

const result = humanizeString(inputText, options);

console.log(result.text); // Humanized text
console.log(result.count); // Number of changed symbols

Options:

Parameter Type Default Description
transformHidden boolean true Removes hidden unicode symbols
transformTrailingWhitespace boolean true Removes spaces at the end of line
transformNbs boolean true Replaces Non-Breaking Space character with regular space
transformDashes boolean true Replaces fancy dashes with regular dash (-)
transformQuotes boolean true Replaces fancy single and double quotes with regular quotes (' and ")
transformOther boolean true Replaces with ...
keyboardOnly boolean false Removes all symbols that cannot be typed with regular keyboard. Applied after all other transformations

About me

Made with 💗 by Nordthx

Check out my other project IMS Creators - game design editor & project management for game developers

License

MIT

About

Humanize string function used in https://humanize-ai.click/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published