Closed teang1995 closed 2 years ago
for json_file_name in os.listdir(data_dir):
json_path = path.join(data_dir, json_file_name)
with open(json_path, 'r', encoding='utf-8') as json_file:
json_data = json.load(json_file)
sentences_info = json_data['sentence']
for sentence_info in sentences_info:
sentence = sentence_info['text']
if sentence.endswith('.'):
print(sentence)
'''
result
케냐 공화국 또는 케냐(Kenya)는 동아프리카의 공화국이다.
인도양에 면해 있으며 북동쪽으로 소말리아, 북쪽으로 에티오피아와 남수단, 서쪽으로 우간다, 남쪽으로 탄자니아와 국경을 맞닿고 있다.
수도는 나이로비이며 공용어는 영어와 스와힐리어이다.
케냐의 주요 종족은 키쿠유족, 루히아족, 루오족, 칼렌진족, 캄바족, 키시족,메루족 등 여러 민족으로 구성되어 있어 각각 다른 언어를 사용한다.
백인, 인도인, 아랍인 등 비아프리카계 민족은 전체 인구의 1% 정도를 차지한다.
인구는 4,403만 명(2013년 7월,CIA 추정자료)이다.
동아프리카에서 발견된 화석에 따르면 조상이 2백만 년 전 이 지역에서 살았다고 한다.
투르카나 호 근처에서의 최근 발굴에 따르면 호모 하빌리스(Homo habilis), 호모 에렉투스(Homo erectus)와 같은 호미니드인(hominid)이 260만 년 전 이 나라 땅에 있었다.
케냐의 식민 시대 역사는 1885년 독일이 잔지바르(현 탄자니아의 잔지바르 섬) 술탄의 케냐 해안 영토에 보호령을 설치한 것으로 시작되었다.
...
'''
앗.. 용량 멈춰! 일단 보류
@teang1995 용택님! gcp에 다운로드 다해놔서 제가 작성한 클래스로 다운받으면 될거같아요!
끝
TL;DR
WHY?
왜 업로드 하는지?
왜 전처리 해야하는지?
sentence
에 한 문장만 있으면 좋지만.. 현실은 그리 녹록치 않더라. 각 데이터에 맞게 업로드 하는 방법을 명시해두어야 나중에 가져올 일이 있다면 편리하게 가져올 수 있을 듯 하다.WHAT?
TODOs
고객 응대 음성공공행정문서 OCR논문 자료 요약명령어 음성 - 노인 남녀명령어 음성 - 일반 남녀민원(콜센터) 질의 - 응답상담 음성소상공인 고객 주문 질의-응답 텍스트시각 정보 기반 질의응답자유대화 음성(소아, 유아)차량 내 대화 및 명령어 음성한국어 방언 발화(강원도)한국어 방언 발화(전라도)한국어 방언 발화(충청도)한국어-중국어 번역 말뭉치(기술 과학)한국인 대화 음성회의 음성