Toya0421 commited on
Commit
f6a23cc
·
verified ·
1 Parent(s): e2c83b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -113,13 +113,13 @@ def build_prompt(text: str, target_level: int, original_fre: Optional[float] = N
113
  original_fre_val = float("nan")
114
 
115
  return f"""
 
116
  The Flesch Reading Ease score is a numeric measure of text readability,
117
  where higher scores indicate easier readability and lower scores indicate more difficult text.
118
 
119
- In this task, we are trying to rewrite a given text into the target Flesch Reading Ease score
120
- and preserving the original meaning and information.
121
 
122
- Given the original draft (Flesch Reading Ease = {original_fre}):
123
 
124
  [TEXT START]
125
  {text}
@@ -130,14 +130,9 @@ Flesch Reading Ease = {target_flesch}
130
 
131
  Follow the instructions below carefully.
132
 
133
- Numerous Readability Manipulation
134
  - Reduce average sentence length while avoiding uniform or fixed-length sentences.
135
  - Introduce natural variation in sentence length to maintain rhythm and avoid mechanical patterns.
136
  - Prefer familiar, high-frequency vocabulary.
137
- - Use simple and direct sentence structures.
138
- - Avoid jargon; if technical terms are necessary, explain them clearly in simple language.
139
- - Minimize figurative language, idioms, and expressions whose meanings are not directly inferable.
140
- - Maintain a natural flow of reading rather than a sequence of evenly shortened sentences.
141
 
142
  Qualitative Readability Control
143
  ・Content preservation
@@ -145,10 +140,14 @@ Qualitative Readability Control
145
  - Do not add new information.
146
  - Do not remove important information.
147
  - Do not introduce interpretations or opinions that are not present in the original text.
 
148
 
149
- Language modernization
150
  - Rewrite the text in clear, modern English.
151
  - Remove archaic expressions and unnatural or outdated syntax typical of older texts at all levels.
 
 
 
152
 
153
  Formatting Constraints
154
  ・Scope of rewriting
@@ -162,7 +161,7 @@ Formatting Constraints
162
  - Do NOT create new section breaks, chapter divisions, or headings.
163
  - Output only the rewritten text.
164
  - Do not include explanations, comments, or metadata.
165
- - Do not include [TEXT START] and [TEXT END] in the output.
166
  """.strip()
167
 
168
 
 
113
  original_fre_val = float("nan")
114
 
115
  return f"""
116
+ Numerous Readability Manipulation:
117
  The Flesch Reading Ease score is a numeric measure of text readability,
118
  where higher scores indicate easier readability and lower scores indicate more difficult text.
119
 
120
+ In this task, we are trying to rewrite a given text into the target Flesch Reading Ease score.
 
121
 
122
+ Given the original draft (Flesch Reading Ease = {original_fre_val}):
123
 
124
  [TEXT START]
125
  {text}
 
130
 
131
  Follow the instructions below carefully.
132
 
 
133
  - Reduce average sentence length while avoiding uniform or fixed-length sentences.
134
  - Introduce natural variation in sentence length to maintain rhythm and avoid mechanical patterns.
135
  - Prefer familiar, high-frequency vocabulary.
 
 
 
 
136
 
137
  Qualitative Readability Control
138
  ・Content preservation
 
140
  - Do not add new information.
141
  - Do not remove important information.
142
  - Do not introduce interpretations or opinions that are not present in the original text.
143
+ - Avoid jargon; if technical terms are necessary, explain them clearly in simple language.
144
 
145
+ Clarity & Naturalness Refinement
146
  - Rewrite the text in clear, modern English.
147
  - Remove archaic expressions and unnatural or outdated syntax typical of older texts at all levels.
148
+ - Maintain a natural flow of reading rather than a sequence of evenly shortened sentences.
149
+ - Minimize figurative language, idioms, and expressions whose meanings are not directly inferable.
150
+ - Use simple and direct sentence structures.
151
 
152
  Formatting Constraints
153
  ・Scope of rewriting
 
161
  - Do NOT create new section breaks, chapter divisions, or headings.
162
  - Output only the rewritten text.
163
  - Do not include explanations, comments, or metadata.
164
+ - Do not include [TEXT START] and [TEXT END] in the output.
165
  """.strip()
166
 
167