Skip to content

Commit

Permalink
Make derive_builder optional
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Apr 16, 2024
1 parent 001222c commit b39957e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ required-features = ["tfidf", "textrank"]

[dependencies]
cedarwood = "0.4"
derive_builder = "0.20.0"
derive_builder = { version = "0.20.0", optional = true }
fxhash = "0.2.1"
lazy_static = "1.0"
ordered-float = { version = "4.0", optional = true }
Expand All @@ -41,8 +41,8 @@ phf_codegen = "0.11"
[features]
default = ["default-dict"]
default-dict = []
tfidf = ["ordered-float"]
textrank = ["ordered-float"]
tfidf = ["dep:ordered-float", "dep:derive_builder"]
textrank = ["dep:ordered-float", "dep:derive_builder"]

[workspace]
members = [
Expand Down
1 change: 1 addition & 0 deletions src/keywords/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use derive_builder::Builder;
use lazy_static::lazy_static;
use std::collections::BTreeSet;

Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ pub use crate::keywords::tfidf::TfIdf;
#[cfg(any(feature = "tfidf", feature = "textrank"))]
pub use crate::keywords::{Keyword, KeywordExtract, KeywordExtractConfig, DEFAULT_STOP_WORDS};

#[cfg(any(feature = "tfidf", feature = "textrank"))]
#[macro_use]
extern crate derive_builder;

mod errors;
mod hmm;
#[cfg(any(feature = "tfidf", feature = "textrank"))]
Expand Down

0 comments on commit b39957e

Please sign in to comment.