본래 프로젝트의 방햗은, 특정 논문의 pdf파일 링크를 input값으로 받으면 해당 문서를 요약하는 것이었으나, 제약사항이 많을 것으로 판단하여 프로젝트 방향을 바꾸었다. pdf파일이 아닌, text파일의 링크를 input값으로 받게끔하였고, 요약의 범위도 논문에서 문서로 확장하였다. 우선 기본적인 기능들을 구현해놓은 뒤, 세부적인 사항은 차차 추가해나가는 쪽으로 방향성을 잡았다.

1. 최종 함수 정의

기존에 정의했던 함수와 동일한 매개변수를 갖도록 하였다. 다만, 기존에는 article_url에 문서 pdf의 링크가 들어갔다면, 현재는 문서 text의 링크가 article_url에 들어간다. input과 output값은 다음과 같이 설정해주었다.

input

def sum_trans(article_url, min_len=100, max_len=300, detail=False, trans=True, frm='en', to='ko'):

output

dict_keys(['summary', 'original_text', 'original_json', 'translation_json'])
‘summary’ ‘original_text’ ‘original_json’ ‘translation_json’
번역 요약문 원본 요약문 원본 json파일 번역문 json파일

아래는 test 결과물이다. 생각했던 것 이상으로 쓸만한 성능을 보여주는 것을 확인할 수 있었다. 또한, detail 옵션이 True가 되면 요약문이 주제별로 쪼개져서 나오는 것을 확인할 수 있었다. 하지만, 이 경우 요약문이 딕셔너리 형태로 출력되기 때문에 코드를 수정해줘야한다. 현재는 큰 틀만 잡아보는 것이기 때문에 일단 detail 옵션에는 False 값만 들어가게 설계하고 차후에 해당 기능을 추가할 계획이다.


1-1. test1 : CNN World 영문 기사

  • 원문 링크
    https://edition.cnn.com/2022/08/15/asia/afghanistan-poverty-taliban-anniversary-intl-cmd/index.html

  • 제목

    ‘Sometimes we eat dinner, sometimes we don’t.’ Afghan food crisis poses dilemma for the West one year after Taliban takeover

  • 원문

    Kabul, Afghanistan (CNN) At midday, Shakeela Rahmati starts the long walk from her home in a poor neighborhood in the hills above Kabul.\n\nAlong the way, other women quietly join the journey. It will take them three hours to reach the city center. But each day they are driven by gnawing hunger and the need to feed their children.\n\nTheir destination is a bakery, one of many in Kabul where crowds of women have started gathering in the late afternoons, patiently waiting for customers who might give them some bread.\n\n”Sometimes we eat dinner, sometimes we don't,” Rahmati says. “The situation has been bad for three years, but this last year was the worst. My husband tried to go to Iran to work but he was deported.”\n\nThe United Nations says that nearly half of the country faces acute hunger. According to a May report by the International Rescue Committee (IRC), 43% percent of Afghanistan's population is living on less than one meal a day, with 90% of Afghans surveyed reporting food (이하 생략)

  • 요약
article_url = "https://edition.cnn.com/2022/08/15/asia/afghanistan-poverty-taliban-anniversary-intl-cmd/index.html"

test1 = sum_trans(article_url)
  • 원본 요약문

43% of Afghanistan’s population is living on less than one meal a day, according to a report by the International Rescue Committee. 90% of Afghans surveyed reported food as their primary need. The United Nations says that nearly half of the country faces acute hunger. The Taliban has yet to be recognized by a single country in the world, with international funding largely frozen. A growing chorus of aid workers and economists say it’s not enough and that the continued freeze of the funds is having a devastating effect.

  • 번역 요약문

국제구호위원회의 보고서에 따르면 아프가니스탄 인구의 43%가 하루 한 끼 미만으로 생활하고 있다. 조사에 응한 아프가니스탄 사람들의 90%가 그들의 주요 요구 사항으로 음식을 보고했습니다. 유엔은 이 나라의 거의 절반이 극심한 기아에 직면해 있다고 말한다. 탈레반은 아직 세계의 단 한 나라로부터 인정을 받지 못했고, 국제 자금도 대부분 동결되었다. 구호단체 종사자들과 경제학자들로 구성된 합창단은 그것이 충분하지 않으며 자금의 지속적인 동결이 파괴적인 영향을 미치고 있다고 말한다.


1-2. test2 : 일반 블로그 설명글

  • 원문 링크
    https://machinelearningmastery.com/tour-of-ensemble-learning-algorithms/

  • 제목

    A Gentle Introduction to Ensemble Learning Algorithms

  • 원문

    Tweet Tweet Share Share\n\nLast Updated on April 27, 2021\n\nEnsemble learning is a general meta approach to machine learning that seeks better predictive performance by combining the predictions from multiple models.\n\nAlthough there are a seemingly unlimited number of ensembles that you can develop for your predictive modeling problem, there are three methods that dominate the field of ensemble learning. So much so, that rather than algorithms per se, each is a field of study that has spawned many more specialized methods.\n\nThe three main classes of ensemble learning methods are bagging, stacking, and boosting, and it is important to both have a detailed understanding of each method and to consider them on your predictive modeling project.\n\nBut, before that, you need a gentle introduction to these approaches and the key ideas behind each method prior to layering on math and code.\n\nIn this tutorial, you will discover the three standard ensemble learning techniques for machine (이하 생략)

  • 요약
article_url = "https://machinelearningmastery.com/tour-of-ensemble-learning-algorithms/"

test2 = sum_trans(article_url, min_len=10, max_len=300, detail=False, trans=True, frm='en', to='ko')

print( test2['original_text'], end="\n\n" )
print( test2['summary'] )
  • 원본 요약문

Ensemble learning is a general approach to machine learning that seeks better predictive performance by combining the predictions from multiple models. The three main classes of ensemble learning methods are bagging, stacking, and boosting.

  • 번역 요약문

앙상블 학습은 여러 모델의 예측을 결합하여 더 나은 예측 성능을 추구하는 기계 학습에 대한 일반적인 접근법이다. 앙상블 학습 방법의 세 가지 주요 클래스는 베깅, 쌓기, 부스팅입니다.


1-3. 차후 추가할 기능

  • 다국어 문서 요약기능
    • 현재는 TLDRThisAPI가 영문서 요약 기능만 지원하지만, 추후 직접 개발 or 다른 API를 찾아서 지원 가능한 언어를 확대할 예정이다.
  • isdetailed 관련 코드 추가
    • 원문을 주제별로 요약해서 요약문을 출력해주는 기능인 isdetailed 관련 코드를 추가할 예정
  • txt 링크외에 pdf 링크도 input으로 받을 수 있게 하기
    • TLDRThisAPI는 pdf 링크도 input으로 받을 수 있는 것으로 알고 있는데, 원인미상의 이유로 에러가 발생한다. 해당 이슈는 큰 틀이 잡힌 뒤 해결할 예정이다.
  • 파일 직접 업로드 기능
    • 요약하고자 하는 원문의 링크가 존재할 수도 있지만, 그렇지 않고 로컬 저장소에 저장되어 있는 경우도 있을 수 있다. 따라서 txt나 pdf 파일을 직접 업로드하는 기능도 추가하고자 한다.


2. 로고 제작

figma를 사용하여 제작하고 싶었지만, 아직 해당 툴을 한번도 다뤄보지 않았기 때문에 다른 툴을 사용하여 작업하였다. 후보로 총 2개의 도안을 제작하였다.


2-1. 후보1

Press It! 이라는 프로젝트 네임에 부합하도록 무언가를 누르고 압축하는 느낌을 강조하고 싶었다. 곧고 쭉 뻗은 직선과 사람 일러스트를 사용하여 이러한 느낌을 표현하고자 하였으며, 최대한 미니멀하게 디자인하려 노력하였다.

로고


레퍼런스


2-2. 후보2

최대한 역동적으로 표현을 하고자 낚시 동호회 로고를 레퍼런스로 사용하였다. 휘감기며 다가오는 손 일러스트를 사용하여 역동적으로 압축하는 느낌을 표현하고자 하였으며, 마찬가지로 press를 강조하려 힘썼다.

로고


레퍼런스

댓글남기기