커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
감성분석에 대한 해석을 어떻게 해야하는건가요..?
undefined주차
북마크
김*원
댓글
1
추천
0
조회수
6
조회수
6
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


감성분석에 대한 해석을 어떻게 해야하는건가요..?


Sentiment 점수를 어떻게 해석해야 하는지 잘 모르겠어요.

마이너스면 부정?

0에 가까우면 중립

1에 가까우면 긍정 인가요?



그리고 해당 뉴스의 URL도 동시에 볼수 있는 코드를 작성해줘 라고 했는데

계속 오류가 납니다..


보고 계신 화면 전 문서 저장하기 Keep에 저장 Keep 바로가기 비지니스코리아2023.05.23. Taking another good look and Celltrion. Focus on stocks with solid momentum and explosive growth potential For 2H23, we... are Celltrion Group, Hanmi Pharm, and Lunit. Celltrion Group is expected to record an increase in...

Sentiment: 0.81

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 이코노타임즈2023.03.31. Celltrion to merge three of its business units and pursue M&A this year Celltrion biopharmaceutical company is combining three of its business units as its founder, Seo... Moreover, the Celltrion Group is looking to acquire the biopharma solutions business of Baxter...

Sentiment: 0.18

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 연합뉴스2023.03.29.네이버뉴스 Celltrion-goal Celltrion chairman vows to help his company become world-leading biosimilar maker by 2030 SEOUL... firm Celltrion Inc., said Wednesday that he will strive to help his company become a leading... 매일경제2023.03.29.네이버뉴스 Three Celltrion companies to be merged as planned, founder says 코리아중앙데일리언론사 선정2023.03.29.네이버뉴스 Celltrion to refine its own drug repertoire to recover from slump 코리아타임스2023.03.29. Celltrion chairman vows to develop new drugs, initiate M&As KBR2023.03.29. Celltrion to build a new manufacturing facility in US

Sentiment: 0.66

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 코리아중앙데일리A4면 1단2023.03.28.네이버뉴스 Celltrion founder returns, says three-way merger will come within the ye... Celltrion companies will come within the year, according to the company's founder and chairman Seo Jung-jin, who returned to the management Tuesday, two years after walking away. “Celltrion is...

Sentiment: 0.00

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 이코노타임즈2023.03.22. Celltrion reportedly bidding to acquire Baxter International’s biopharm... Celltrion Inc, a biopharmaceutical company headquartered in Incheon, may place its bid to... Korea Joongang Daily reported that Celltrion is also competing with other international companies for...

Sentiment: 0.00

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 KBR2023.05.09. Celltrion nixes plan to buy Baxter's biopharma unit Celltrion, a Korean biopharma giant, has announced that it will no longer pursue the acquisition... Celltrion has revealed through a public filing on Tuesday that it had contemplated the...

Sentiment: -0.30

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 Korea IT Times2023.05.10. Celltrion Presents Positive Clinical Trial Results for Remsima SC at DDW... Celltrion participated in the 2023 Digestive Disease Week (DDW) held in Chicago and online from... / Courtesy of Celltrion Celltrion, a South Korean biopharmaceutical company, participated in the...

Sentiment: 0.73

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 매일경제2023.03.06.네이버뉴스 Celltrion founder Seo Jung-jin to return to leadership Seo Jung-jin, the founder of Celltrion Group, will return as the board chairman of Celltrion Holdings Co. and three other group affiliates, two years after he stepped down. “When the global...

Sentiment: 0.00

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 연합뉴스3일 전네이버뉴스 KOSPI 200 Closing Price List-4 4,100 Celltrion 172,200 DN 1,300 TKG Huchems 23,500 UP 550 JB Financial Group 8,580 UP 50 DAEWOONG PHARM 113,100 DN 500 HYUNDAIDEPTST 51,200 UP 400 KIH 56,200 UP 700 GS 39,100 UP 350 LIG Nex1 79...

Sentiment: 0.00

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 연합뉴스4일 전네이버뉴스 Nearly 550 S. Korean bio firms to attend Bio Int'l Convention Samsung Biologics Co., Celltrion Inc. and other major South Korean drug firms will set up their own booths to showcase major technologies and products, it added. On the sidelines of the event...

Sentiment: 0.00

==================================================

문서 저장하기 Keep에 저장 Keep 바로가기 연합뉴스5일 전네이버뉴스 (LEAD) Seoul shares at 1-year high on hopes Fed pauses rate hikes Samsung Biologics shed 0.38 percent to 785,000 won, and Celltrion lost 1.08 percent to 173,500 won. The local currency ended at 1,305.7 won against the U.S. dollar, up 15.9 won from the previous... 코리아중앙데일리5일 전네이버뉴스 Kospi rallies above 2,600 for first time since last June 연합뉴스6일 전네이버뉴스 Seoul shares up late Fri. morning on tech gains 연합뉴스6일 전네이버뉴스 Seoul shares at 1-year high on hopes Fed pauses rate hikes

Sentiment: 0.98체를 캡처해 주시면, 튜터님들이 빠르게 상황을 이해할 수 있어요.




작성한 코드 및 에러 메세지

오류 발생 시, 작성한 코드 전체와 에러!pip install vaderSentiment

from bs4 import BeautifulSoup

import requests

from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer


# 검색할 키워드

query = "samsung electronics"


# 네이버 뉴스 검색 결과 URL

url = f"https://search.naver.com/search.naver?query={query}&where=news&ie=utf8&sm=nws_hty"


# 뉴스 헤드라인을 저장할 리스트

headlines = []

urls = []


# 네이버 뉴스 검색 결과 페이지에서 뉴스 헤드라인 스크래핑

for page in range(1, 6): # 1페이지부터 5페이지까지 검색 결과 수집

  res = requests.get(f"{url}&start={page*10-9}")

  soup = BeautifulSoup(res.text, "html.parser")

  titles = soup.select('ul.list_news > li')

  for title in titles:

    headlines.append(title.text)

    url = title.select_one('a._sp_each_title')['href']

    urls.append(url)


# VADER 분석기 생성

analyzer = SentimentIntensityAnalyzer()


# 뉴스 헤드라인 감성분석 수행

for i in range(len(headlines)):

  headline = headlines[i]

  vs = analyzer.polarity_scores(headline)

  print(headline)

  print(f"Sentiment: {vs['compound']:.2f}")

  print("URL:", urls[i])

  print("="*50)

메시지를 첨부해 주세요.

Tip 1) </> 아이콘을 눌러 코드박스를 만들어 보세요.

Tip 2) Ctrl+A(맥의 경우 Command+A) 단축키로 코드를 한 번에 선택할 수 있어요!




취소
 공유
취소
댓글 0
댓글 알림
나의얼굴