|
|
@ -308,9 +308,16 @@ def post_sentence_ulit(sentence, text_info): |
|
|
|
if "改写后:" in sentence: |
|
|
|
sentence_lable_index = sentence.index("改写后:") |
|
|
|
sentence = sentence[sentence_lable_index + 4:] |
|
|
|
if sentence[-1] == "\n": |
|
|
|
sentence = sentence[:-1] |
|
|
|
# if sentence[-1] == "\n": |
|
|
|
# sentence = sentence[:-1] |
|
|
|
|
|
|
|
sentence = sentence.strip("\n") |
|
|
|
if sentence[-1] != text_info[0][-1]: |
|
|
|
if is_chinese(text_info[0][-1]) == True: |
|
|
|
if is_chinese(sentence[-1]) != True: |
|
|
|
sentence = sentence[:-1] |
|
|
|
else: |
|
|
|
sentence = sentence[:-1] + text_info[0][-1] |
|
|
|
|
|
|
|
else: |
|
|
|
sentence = text_info[0] |
|
|
@ -560,4 +567,4 @@ if __name__ == "__main__": |
|
|
|
'%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s' |
|
|
|
# 日志格式 |
|
|
|
) |
|
|
|
app.run(host="0.0.0.0", port=14008, threaded=True, debug=False) |
|
|
|
app.run(host="0.0.0.0", port=14002, threaded=True, debug=False) |
|
|
|