Update kousei.py
Browse files
kousei.py
CHANGED
|
@@ -26,7 +26,7 @@ def check_text(text, radio_option):
|
|
| 26 |
|
| 27 |
# Split the text into sentences for individual checks
|
| 28 |
# This regex splits on punctuation but keeps the punctuation with the previous sentence
|
| 29 |
-
sentences = re.split(r'(?<=[。!??!.])\s*', text)
|
| 30 |
|
| 31 |
for sentence in sentences:
|
| 32 |
sentence = sentence.strip()
|
|
@@ -58,6 +58,7 @@ def check_text(text, radio_option):
|
|
| 58 |
|
| 59 |
|
| 60 |
|
|
|
|
| 61 |
def kousei2(csv_file, input_text,radio_option):
|
| 62 |
prompt_text = "#Instructions\n" + input_text +" If there is no problem, please reply with only 2 letters 'OK' and DON'T put any other extra words. \n #Target sentence\n"
|
| 63 |
# CSVファイルを読み込む
|
|
|
|
| 26 |
|
| 27 |
# Split the text into sentences for individual checks
|
| 28 |
# This regex splits on punctuation but keeps the punctuation with the previous sentence
|
| 29 |
+
sentences = re.split(r'(?<=[。!??!.])\s*|\n', text)
|
| 30 |
|
| 31 |
for sentence in sentences:
|
| 32 |
sentence = sentence.strip()
|
|
|
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
+
|
| 62 |
def kousei2(csv_file, input_text,radio_option):
|
| 63 |
prompt_text = "#Instructions\n" + input_text +" If there is no problem, please reply with only 2 letters 'OK' and DON'T put any other extra words. \n #Target sentence\n"
|
| 64 |
# CSVファイルを読み込む
|