Pagon Gatchalee
Nov 2 · 2 min read

ทดลองทำ sentiment analysis

AI คราวนี้ ได้เรียนรู้เกี่ยวกับ Sentiment analysis ซึ่งเป็นหนึ่งใน Machine learning ที่ถูกนำมาใช้บ่อยมากในปัจจุบัน โดยเป็นการวิเคราะห์ความรู้สึกและอารมณ์จากข้อความ โดยจะแสดงออกมาเป็น เชิงบวก (Positive), เชิงลบ (negative) และเป็นกลาง (Neutral)

โดยได้ใช้ Dataset เป็นความคิดเห็น จำนวน 24,063 records

จากข้อมูล ลองเอามาพล็อทกราฟดูว่า สถานะของอารมณ์เป็นแบบไหนบ้าง ระหว่าง บวก,ลบ,และกลาง

ทดสอบการตัดคำในประโยคในDataset

หาความยาวของประโยค

ลองเอา ตัวอย่างประโยคใน training set ที่มีclass เป็น กลาง neutral

ขั้นตอนทำ word2vector เพื่อวิเคราะห์แต่ละคำ ว่า มีclassแบบไหน

หาคำที่มีclassให้ความรู้สึกคล้ายกับคำว่าเสียดาย

    Written by

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade