Spaces:
Runtime error
Runtime error
Junru Shen
commited on
Commit
•
b5b0f6a
1
Parent(s):
44a605e
make grammar correction prompt more clear
Browse files- functional.py +13 -5
functional.py
CHANGED
@@ -21,12 +21,20 @@ def get_functionals():
|
|
21 |
"Suffix": r"",
|
22 |
},
|
23 |
"查找语法错误": {
|
24 |
-
"Prefix": r"
|
25 |
-
r"
|
26 |
-
r"
|
27 |
-
r"If you find grammar or spelling mistakes, please list mistakes you find in a two-column markdown table, " +
|
28 |
r"put the original text the first column, " +
|
29 |
-
r"put the corrected text in the second column and highlight the key words you fixed."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
"Suffix": r"",
|
31 |
"PreProcess": clear_line_break, # 预处理:清除换行符
|
32 |
},
|
|
|
21 |
"Suffix": r"",
|
22 |
},
|
23 |
"查找语法错误": {
|
24 |
+
"Prefix": r"Can you help me ensure that the grammar and the spelling is correct? " +
|
25 |
+
r"Do not try to polish the text, if no mistake is found, tell me that this paragraph is good." +
|
26 |
+
r"If you find grammar or spelling mistakes, please list mistakes you find in a two-column markdown table, " +
|
|
|
27 |
r"put the original text the first column, " +
|
28 |
+
r"put the corrected text in the second column and highlight the key words you fixed.""\n"
|
29 |
+
r"Example:""\n"
|
30 |
+
r"Paragraph: How is you? Do you knows what is it?""\n"
|
31 |
+
r"| Original sentence | Corrected sentence |""\n"
|
32 |
+
r"| :--- | :--- |""\n"
|
33 |
+
r"| How **is** you? | How **are** you? |""\n"
|
34 |
+
r"| Do you **knows** what **is** **it**? | Do you **know** what **it** **is** ? |""\n"
|
35 |
+
r"Below is a paragraph from an academic paper. "
|
36 |
+
r"You need to report all grammar and spelling mistakes as the example before."
|
37 |
+
+ "\n\n",
|
38 |
"Suffix": r"",
|
39 |
"PreProcess": clear_line_break, # 预处理:清除换行符
|
40 |
},
|