|
@@ -38,7 +38,7 @@ def extract_sample_data(data: List[List[str]], start_row: int = 0, column_index:
|
|
|
logger.error(f"Error extracting sample data: {e}")
|
|
logger.error(f"Error extracting sample data: {e}")
|
|
|
raise
|
|
raise
|
|
|
|
|
|
|
|
-def log_data_details(data: List[List[str]], search_term_index: int, start_row: int = 3):
|
|
|
|
|
|
|
+def log_data_details(data: List[List[str]], search_term_index: int, start_row: int = 2):
|
|
|
"""记录数据详细信息"""
|
|
"""记录数据详细信息"""
|
|
|
try:
|
|
try:
|
|
|
# 记录行号和列号
|
|
# 记录行号和列号
|
|
@@ -54,7 +54,7 @@ def log_data_details(data: List[List[str]], search_term_index: int, start_row: i
|
|
|
raise
|
|
raise
|
|
|
|
|
|
|
|
def process_batch_translations(data: List[List[str]],
|
|
def process_batch_translations(data: List[List[str]],
|
|
|
- search_term_index: int,
|
|
|
|
|
|
|
+ search_term_index=0,
|
|
|
start_row: int = 3) -> Tuple[List[List[str]], List[List[str]]]:
|
|
start_row: int = 3) -> Tuple[List[List[str]], List[List[str]]]:
|
|
|
"""批量处理搜索词翻译"""
|
|
"""批量处理搜索词翻译"""
|
|
|
try:
|
|
try:
|
|
@@ -103,7 +103,7 @@ def main():
|
|
|
input_file = output_dir/"测试.csv"
|
|
input_file = output_dir/"测试.csv"
|
|
|
output_file = output_dir/"processed_测试.csv"
|
|
output_file = output_dir/"processed_测试.csv"
|
|
|
data = read_csv(input_file)
|
|
data = read_csv(input_file)
|
|
|
- process_batch_translations(data, 2)
|
|
|
|
|
|
|
+ # process_batch_translations(data, 2)
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if __name__ == "__main__":
|
|
|
main()
|
|
main()
|