use std::time::Duration;
mod candidates;
mod credits;
mod detector;
mod detector_input_normalization;
pub mod golden_utils;
mod grammar;
mod hints;
mod lexer;
mod line_tracking;
mod parser;
mod patterns;
mod prepare;
mod refiner;
mod types;
pub use credits::{detect_credits_authors, is_credits_file};
pub(crate) use refiner::refine_author;
pub use types::{AuthorDetection, CopyrightDetection, HolderDetection};
pub fn detect_copyrights(
content: &str,
max_runtime: Option<Duration>,
) -> (
Vec<CopyrightDetection>,
Vec<HolderDetection>,
Vec<AuthorDetection>,
) {
if let Some(max_runtime) = max_runtime {
detector::detect_copyrights_from_text_with_deadline(content, Some(max_runtime))
} else {
detector::detect_copyrights_from_text(content)
}
}