1. 텔레그램 채팅방으로부터 말뭉치 데이터 얻기
# JSON 파일을 읽어오는 함수 # 텔레그램에서 추출한 대화 데이터 파일을 user, text 형태의 csv파일로 추출 import json import csv def read_json_file(file_path): with open(file_path, 'r', encoding='utf-8') as json_file: data = json.load(json_file) return data def extract_actor_text_to_csv(json_data, output_csv_file): with open(output_csv_file, 'w', newline='', encoding='utf-8') as csv_file: writer = csv.writer(csv_file) writer.writero..
2023.09.16