ZAYUVALYA - AI Humanizer is a free, open-source tool designed to help users rephrase and humanize text effortlessly. Built with simplicity and efficiency in mind, this tool ensures that your text is transformed into a more natural and human-like form while preserving its original meaning. ZAYUVALYA - AI Humanizer operates entirely in the browser, making it accessible, private, and 100% free to use without any login required.
-
Context-Aware Paraphrasing:
- Uses advanced logic to replace words with contextually appropriate synonyms.
- Identifies proper nouns and fixed terms to avoid altering essential information.
-
Highlight Changes:
- Words that are altered during the paraphrasing process are highlighted in the output for easy identification.
-
Word and Sentence Counters:
- Provides real-time tracking of word and sentence counts for input text.
-
Responsiveness:
- Fully responsive design optimized for desktop and mobile devices.
-
Dark Theme Interface:
- Elegant dark-themed UI with a minimalistic approach for a better user experience.
-
Open Source:
- Encourages contributions from the community to improve and expand the project.
This section explains the internal logic, algorithms, and structure of ZAYUVALYA - AI Humanizer for developers. The primary components include the vocabulary dataset, JSON structure, stop words handling, proper noun detection, and the paraphrasing algorithm.
The vocabulary is stored in a JSON file (eng_synonyms.json
) with the following structure:
{
"word": ["synonym1", "synonym2", "synonym3"]
}
- Key: The word to be replaced.
- Value: An array of synonyms for the word.
Example:
{
"happy": ["joyful", "content", "pleased"],
"run": ["jog", "sprint", "dash"]
}
- Current Hosted File: https://zayuvalya.github.io/Library/Languages/eng_synonyms.json
- Original Source: Kaggle Dataset - English Synonyms JSON Thesaurus
Stop words are common words that should not be altered, such as "the", "is", and "at". These are stored in a separate JSON file (stop_words.json
) and loaded into memory during initialization.
Example structure of stop_words.json
:
["the", "is", "and", "at", "on", "in"]
The function isStopWord()
checks if a word is in the stop words list:
function isStopWord(word) {
return stopWords.includes(word.toLowerCase());
}
Certain terms like "halal", "haram", or specific names should not be modified. These are stored in an array within the script itself:
const fixedTerms = ["halal", "haram", "sharia", "jihad", "zakat", "hajj", "umrah", "Allah", "Jesus", "Buddha", "nirvana", "dharma", "Tao", "karma", "sin", "salvation", "amen", "hallelujah", "om", "mantra", "Torah", "Gospel", "Quran", "Bible", "Talmud", "Scriptures", "Ten Commandments", "Five Pillars of Islam", "Eightfold Path", "sacrament", "worship", "prayer", "meditation", "faith", "hope", "charity", "forgiveness", "heaven", "hell", "soul", "spirit", "God", "creator", "divine", "sacred", "holy", "prophet", "apostle", "saint", "angel", "demon", "Satan", "evil", "good", "righteousness", "justice", "mercy", "compassion", "love", "peace"];
function isFixedTerm(word) {
return fixedTerms.includes(word.toLowerCase());
}
Proper nouns (e.g., "New York", "Tesla") are identified using regex patterns:
function isProperNoun(word) {
return /^[A-Z][a-z]*$/.test(word);
}
This ensures that capitalized words remain untouched during the paraphrasing process.
The paraphrasing process involves:
- Splitting the input text into words and punctuation using
\b
(word boundaries). - Iterating over each token and determining whether it should be replaced.
- Highlighting replaced words and keeping unchanged words as they are.
Key function: replaceWord()
function replaceWord(word) {
const lowerCaseWord = word.toLowerCase();
if (isStopWord(lowerCaseWord) || isFixedTerm(lowerCaseWord) || isProperNoun(word)) {
return word; // No replacement
}
if (vocabulary[lowerCaseWord]) {
const synonyms = vocabulary[lowerCaseWord];
return synonyms[Math.floor(Math.random() * synonyms.length)]; // Random synonym
}
return word; // No synonym found
}
Paraphrasing execution:
function paraphraseText(inputText) {
const words = inputText.split(/(\b|\s+|[.,!?]+)/); // Split text
let paraphrasedWords = [];
words.forEach(word => {
if (/\w+/.test(word)) { // Match words only
const newWord = replaceWord(word);
if (newWord !== word) {
paraphrasedWords.push(`<span class='highlight'>${newWord}</span>`); // Highlight
} else {
paraphrasedWords.push(word);
}
} else {
paraphrasedWords.push(word); // Keep punctuation
}
});
return paraphrasedWords.join('');
}
Two utility functions track the number of words and sentences:
function countWords(text) {
return text.trim().split(/\s+/).filter(word => word.length > 0).length;
}
function countSentences(text) {
return text.split(/[.!?]+/).filter(sentence => sentence.trim().length > 0).length;
}
The highlight
class is applied to replaced words:
.highlight {
background-color: #ECDFCC;
color: #1E201E;
font-weight: bold;
padding: 2px 4px;
border-radius: 3px;
}
- index.html: Contains the layout and structure of the web application.
- styles.css: Provides styling for the dark theme and responsive design.
- script.js: Implements the paraphrasing logic and interactive functionality.
- eng_synonyms.json: Stores the vocabulary dataset for synonym replacement.
- stop_words.json: Contains the list of stop words.
We welcome contributions from the community! To contribute:
- Fork the repository.
- Create a branch for your changes.
- Submit a pull request detailing your updates.
This project is licensed under the MIT License, ensuring it remains free and open for everyone to use and improve.