Rust ![Latest Version] Docs.rs

RustySozluk

Firefly rustysozluk-rust programming, sour, crabs with green lemons 67820

Description

RustySozluk is a Rust library for fetching user entries and thread entries from eksisozluk.com and analyzing sentiment of entries. With the power of Rust and tokio library, it is possible to fetch entries in a thread in a very short time.

Features

Installation

Add rustysozluk to your Cargo.toml:

toml [dependencies] rustysozluk = "0.1.7"

Usage

```rust use rustysozluk::{fetch_user, tokio};

[tokio::main]

async fn main() -> Result<(), Box> { let username= "morgomir"; // username to fetch //alınacak kullanıcı adı let entrynumber = 4; // number of entries to fetch //alınacak girdi sayısı let entries = fetchuser(username, entry_number).await?; println!("Extracted {} entries:", entries.len()); for entry in entries.iter() { println!("Content: {}\nDate: {}\nUsername: {}", entry.content, entry.date, entry.username); } Ok(()) } ```

If you want to fetch entries in a thread, you can simple use fetch_thread function just like fetch_user function, no need to change anything.

Sentiment Analysis

rustysozluk has "analyzer" module which is used for sentiment analysis. It uses Sağlam et al., 2019 model to classify entries as positive, negative and give a "Tone" score between -1 and 1.

here is an example usage:

```rust use rustysozluk::tokio; use rustysozluk::fetchtitle; use rustysozluk::analyzer::analyzer::analyzesentiment;

[tokio::main]

async fn main() -> Result<(), Box> { let title = "https://eksisozluk1923.com/rust-programlama-dili--5575227"; let numberofentries = 4; let entries = fetchtitle(title, numberofentries).await?; analyzesentiment(entries)?; Ok(())

} ```

Contributing

Any kind of contribution is welcome! Feel free to open an issue =)