1
2
3
4
5
6
7
8
9
10
11
12
13
| package com.xmzs.midjourney.service;
|
| import java.util.regex.Pattern;
|
| public interface TranslateService {
|
| String translateToEnglish(String prompt);
|
| default boolean containsChinese(String prompt) {
| return Pattern.compile("[\u4e00-\u9fa5]").matcher(prompt).find();
| }
|
| }
|
|