llm_readability

Crates.iollm_readability
lib.rsllm_readability
version0.0.11
sourcesrc
created_at2024-08-28 13:57:21.101804
updated_at2024-10-25 13:23:47.1011
descriptionReadability library for LLM's built in Rust
homepage
repositoryhttps://github.com/spider-rs/llm-readability
max_upload_size
id1354684
size29,246
Jeff Mendez (j-mendez)

documentation

https://docs.rs/llm_readability

README

llm_readability

The Rust readability library built for performance, AI, and multiple locales. The library is used on Spider Cloud for data cleaning.

Usage

[dependencies]
llm_readability = "0"
use llm_readability::extractor;

fn main() {
  match extractor::extract(&mut "<html>...</html>".as_bytes(), "https://example.com", None) {
      Ok(product) => {
          println!("------- html ------");
          println!("{}", product.content);
          println!("---- plain text ---");
          println!("{}", product.text);
      },
      Err(_) => println!("error occured"),
  }
}

This project is a rewrite of readability-rs for performance and bug fixes.

Commit count: 10

cargo fmt