Coder Social home page Coder Social logo

0mustafa / nlp_tweet_analysis_system Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.82 MB

Bu projede Twitter'dan çekilen verilerle oluşturulan veritabanı kullanılarak girilen alternatif bir Tweet'in kime ait olabileceği yüzdesel olarak tahmin ediliyor.

Python 15.79% Jupyter Notebook 84.21%
decision-trees nlp nlp-machine-learning twitter multinomial-naive-bayes

nlp_tweet_analysis_system's Introduction

NLP_tweet_analysis_system

tweet_analysis_introduction

Bu projede Twitter'dan çekilen verilerle oluşturulan veritabanı kullanılarak, girilen alternatif bir Tweet'in kime ait olabileceği yüzdesel olarak tahmin edilmektedir.

Projenin Kullanım Alanları

- Bir tweetin daha önce birisi tarafından paylaşılmış olma ihtimali hesaplanabilir.
- Daha önce paylaşılmamış bir tweetin hangi kullanıcı tarafından yazılmış olabileceği tahmin edilebilir.



Twitter'dan Veri Çekmek

Veri çekerken pythonda bulunan snscrape kütüphanesi kullanılmıştır.
Bu kütüphane temel olarak Twitter'da bulunana Advanced Search alanının yazılıma implemente edilmiş halidir.

query = "(from:netflixturkiye) until:2023-01-01 since:2021-01-01"

Verilen örnekte netflixturkiye kullanıcı adına sahip twitter hesabından 01.01.2021 - 01.01.2023 tarihleri arasındaki tüm tweetleri görmek isteyeceğimiz bir sorgu gösterilmektedir.
Daha sonrasında çekilen veriler bir csv dosyasına aktarılarak işlenmeye hazır hale getirilmektedir.

Verilerin işlenmesi

Başka bir python dosyasında içeri aktarılan veriler bir temizleme fonksiyonundan geçmektedir. Screenshot_3
Bu temizleme fonksiyonunda verilerin içindeki sayılar ve bazı kelimeler herhangi bir anlam ifade etmediğinden verimizin içinden çıkarılmıştır.
Devamında noktalama işaretlerinden de ayıklanan tweetlerimiz clean sütunu altına yazılmıştır.
Algoritmamızın düzgün çalışabilmesi için tweetleri etiketlememiz gerekmektedir.

* Acun Ilıcalı: 0
* Rasim Ozan Kütahyalı: 1
* Webtekno: 2
* Netflix: 3

Yukarıdaki etiketlemeye sadık kalarak verilerimizi etiketliyoruz.

Screenshot_4


Verilerden elde edeceğimiz analiz için TF-IDF, Bayes teoremi ve Decision Tree algoritmalarını kullanıyoruz.
Projemiz artık bitmiş durumda verilen bir Tweet'in 4 kullanıcıdan hangilerine ait olabileceğini sağlıklı bir şekilde oransallaştırabilmektedir.

Screenshot_5 Projemize son olarak Netflix'in eskiden paylaştığı önerdiğim diziyi izledin mi diyorum bana nau nau diyor Tweet'ini veriyoruz ve bize aşağıdaki sonuçları veriyor.

* Acun Ilıcalı: %0.56
* Rasim Ozan Kütahyalı: %6.95
* Webtekno: %4.92
* Netflix: %87.57

nlp_tweet_analysis_system's People

Contributors

0mustafa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.