Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -291,6 +291,7 @@ def rewrite_level(text, target_level, original_fre):
|
|
| 291 |
original_fre_val = float("nan")
|
| 292 |
|
| 293 |
prompt = f"""
|
|
|
|
| 294 |
The Flesch Reading Ease score is a numeric measure of text readability,
|
| 295 |
where higher scores indicate easier readability and lower scores indicate more difficult text.
|
| 296 |
|
|
@@ -308,14 +309,9 @@ Flesch Reading Ease = {target_flesch}
|
|
| 308 |
|
| 309 |
Follow the instructions below carefully.
|
| 310 |
|
| 311 |
-
Numerous Readability Manipulation
|
| 312 |
- Reduce average sentence length while avoiding uniform or fixed-length sentences.
|
| 313 |
- Introduce natural variation in sentence length to maintain rhythm and avoid mechanical patterns.
|
| 314 |
- Prefer familiar, high-frequency vocabulary.
|
| 315 |
-
- Use simple and direct sentence structures.
|
| 316 |
-
- Avoid jargon; if technical terms are necessary, explain them clearly in simple language.
|
| 317 |
-
- Minimize figurative language, idioms, and expressions whose meanings are not directly inferable.
|
| 318 |
-
- Maintain a natural flow of reading rather than a sequence of evenly shortened sentences.
|
| 319 |
|
| 320 |
Qualitative Readability Control
|
| 321 |
・Content preservation
|
|
@@ -323,10 +319,14 @@ Qualitative Readability Control
|
|
| 323 |
- Do not add new information.
|
| 324 |
- Do not remove important information.
|
| 325 |
- Do not introduce interpretations or opinions that are not present in the original text.
|
|
|
|
| 326 |
|
| 327 |
-
・
|
| 328 |
- Rewrite the text in clear, modern English.
|
| 329 |
- Remove archaic expressions and unnatural or outdated syntax typical of older texts at all levels.
|
|
|
|
|
|
|
|
|
|
| 330 |
|
| 331 |
Formatting Constraints
|
| 332 |
・Scope of rewriting
|
|
@@ -340,7 +340,7 @@ Formatting Constraints
|
|
| 340 |
- Do NOT create new section breaks, chapter divisions, or headings.
|
| 341 |
- Output only the rewritten text.
|
| 342 |
- Do not include explanations, comments, or metadata.
|
| 343 |
-
- Do not include [TEXT START] and [TEXT END] in the output.
|
| 344 |
""".strip()
|
| 345 |
|
| 346 |
with _rewrite_sem:
|
|
|
|
| 291 |
original_fre_val = float("nan")
|
| 292 |
|
| 293 |
prompt = f"""
|
| 294 |
+
Numerous Readability Manipulation:
|
| 295 |
The Flesch Reading Ease score is a numeric measure of text readability,
|
| 296 |
where higher scores indicate easier readability and lower scores indicate more difficult text.
|
| 297 |
|
|
|
|
| 309 |
|
| 310 |
Follow the instructions below carefully.
|
| 311 |
|
|
|
|
| 312 |
- Reduce average sentence length while avoiding uniform or fixed-length sentences.
|
| 313 |
- Introduce natural variation in sentence length to maintain rhythm and avoid mechanical patterns.
|
| 314 |
- Prefer familiar, high-frequency vocabulary.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
|
| 316 |
Qualitative Readability Control
|
| 317 |
・Content preservation
|
|
|
|
| 319 |
- Do not add new information.
|
| 320 |
- Do not remove important information.
|
| 321 |
- Do not introduce interpretations or opinions that are not present in the original text.
|
| 322 |
+
- Avoid jargon; if technical terms are necessary, explain them clearly in simple language.
|
| 323 |
|
| 324 |
+
・Clarity & Naturalness Refinement
|
| 325 |
- Rewrite the text in clear, modern English.
|
| 326 |
- Remove archaic expressions and unnatural or outdated syntax typical of older texts at all levels.
|
| 327 |
+
- Maintain a natural flow of reading rather than a sequence of evenly shortened sentences.
|
| 328 |
+
- Minimize figurative language, idioms, and expressions whose meanings are not directly inferable.
|
| 329 |
+
- Use simple and direct sentence structures.
|
| 330 |
|
| 331 |
Formatting Constraints
|
| 332 |
・Scope of rewriting
|
|
|
|
| 340 |
- Do NOT create new section breaks, chapter divisions, or headings.
|
| 341 |
- Output only the rewritten text.
|
| 342 |
- Do not include explanations, comments, or metadata.
|
| 343 |
+
- Do not include [TEXT START] and [TEXT END] in the output.
|
| 344 |
""".strip()
|
| 345 |
|
| 346 |
with _rewrite_sem:
|