Spaces:
Running
Running
eheguy commited on
Commit Β·
c0238b9
1
Parent(s): 8484038
Fix hyphenated compound words in Enhanced prompt
Browse files- humanizer.py +37 -22
humanizer.py
CHANGED
|
@@ -75,31 +75,46 @@ Rules:
|
|
| 75 |
11. Output ONLY the rewritten text. No preamble. No explanation."""
|
| 76 |
|
| 77 |
# ββ ENHANCED ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 78 |
-
ENHANCED_PROMPT = """You are an expert human writer
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
-
|
| 83 |
-
- Perplexity: AI always picks the most statistically probable next word. You must pick less predictable but still natural words.
|
| 84 |
-
- Burstiness: AI writes uniform sentence lengths (15, 14, 16 words). You must write with extreme variance.
|
| 85 |
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
# ββ READABILITY MODIFIERS βββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 105 |
READABILITY_MODIFIERS = {
|
|
|
|
| 75 |
11. Output ONLY the rewritten text. No preamble. No explanation."""
|
| 76 |
|
| 77 |
# ββ ENHANCED ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 78 |
+
ENHANCED_PROMPT = """You are an expert human writer. Rewrite the text below so it reads like natural human writing and bypasses AI detection.
|
| 79 |
|
| 80 |
+
Study these human writing examples first:
|
| 81 |
|
| 82 |
+
{few_shot_examples}
|
|
|
|
|
|
|
| 83 |
|
| 84 |
+
SENTENCE STRUCTURE RULES (follow exactly):
|
| 85 |
+
- Every paragraph must contain at least one sentence under 7 words.
|
| 86 |
+
- Every paragraph must contain at least one sentence over 25 words.
|
| 87 |
+
- Never write two sentences of similar length back to back.
|
| 88 |
+
- Use sentence fragments occasionally. Like this. They work.
|
| 89 |
+
- One sentence per paragraph can be a question the writer asks themselves.
|
| 90 |
+
|
| 91 |
+
WORD CHOICE RULES:
|
| 92 |
+
- Never use these words: tapestry, delve, testament, beacon, foster, align, overarching, landscape, seamlessly, groundbreaking, revolutionary, pivotal, crucial, vital, robust, leverage, utilize, facilitate, commence, endeavor, multifaceted.
|
| 93 |
+
- Avoid the most obvious word choice. Pick the second or third most natural option.
|
| 94 |
+
- Mix formal and casual words in the same paragraph deliberately.
|
| 95 |
+
- Use contractions naturally in 30% of sentences.
|
| 96 |
+
|
| 97 |
+
STYLE RULES:
|
| 98 |
+
- Remove these phrases entirely: "It is important to note", "Furthermore", "Moreover", "In conclusion", "When it comes to", "It is worth noting", "Needless to say", "It goes without saying", "It is crucial to", "One must consider".
|
| 99 |
+
- No hyphens (-), em dashes (β), or en dashes (β). Use commas or new sentences.
|
| 100 |
+
- No perfectly balanced bullet lists. Break them into prose.
|
| 101 |
+
- Add one parenthetical thought somewhere that sounds natural.
|
| 102 |
+
- Add one personal observation or opinion β one moment that sounds like a real person wrote this.
|
| 103 |
+
- Flip passive voice to active voice throughout.
|
| 104 |
+
|
| 105 |
+
WHAT NOT TO DO:
|
| 106 |
+
- Do not chain clauses together with endless commas.
|
| 107 |
+
- Do not write run-on sentences stuffed with comma-connected phrases.
|
| 108 |
+
- Do not repeat the same sentence structure twice in a row.
|
| 109 |
+
- Do not add filler phrases to make sentences longer.
|
| 110 |
+
- Do not use hyphenated compound words like "not-so-great" or "laid-back".
|
| 111 |
+
Rewrite them as plain phrases instead (e.g. "not great", "relaxed").
|
| 112 |
+
- Do not change the core meaning, facts, or argument.
|
| 113 |
+
|
| 114 |
+
OUTPUT:
|
| 115 |
+
- Rewritten text only.
|
| 116 |
+
- No introduction, no explanation, no "Here is the rewritten version".
|
| 117 |
+
- Clean, readable, natural prose that sounds like a human wrote it."""
|
| 118 |
|
| 119 |
# ββ READABILITY MODIFIERS βββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 120 |
READABILITY_MODIFIERS = {
|