pub fn unboilerplate(document: &str) -> Result<String, Error> {
    // pass 1 and 2: parse to html tree, naive scan
    // of all text blocks
    let blocks = scan(document)?;

    // Apply algorithm here

    //Ok(algorithm::all(blocks))
    Ok(algorithm::num_words(blocks))
}
/// public entrypoint.
/// Input html document, get back non-boilerplate content with no tags.
///
/// Text blocks are any text that is separate by tags from other text.
///
/// Anchors are the only tag not considered a separator.
/// I'll check the siblings of an anchor; if it's equal to the text
/// node on either side, then concatenate.
///
/// - pass 1: parse and build html tree
/// - pass 2: naive scan of all text blocks and concatenate anchor blocks
/// - pass 3: compute link density
///
/// For the algorithm selection, should I use enums and match, or
/// Algorithm trait?
///
/// TODO how do I make Block not a public interface?
public entrypoint.
Input html document, get back non-boilerplate content with no tags.

Text blocks are any text that is separate by tags from other text.

Anchors are the only tag not considered a separator.
I'll check the siblings of an anchor; if it's equal to the text
node on either side, then concatenate.

pass 1: parse and build html tree
pass 2: naive scan of all text blocks and concatenate anchor blocks
pass 3: compute link density




public entrypoint . Input html document get back non - boilerplate content with no tags . Text blocks are any text that is separate by tags from other text . Anchors are the only tag not considered a separator . I ' ll check the siblings of an anchor ; if it ' s equal to the text node on either side then concatenate . pass 1 : parse and build html tree pass 2 : naive scan of all text blocks and concatenate anchor blocks pass 3 : compute link density
pub fn unboilerplate(document: &str) -> Result<String, Error> {
    // pass 1 and 2: parse to html tree, naive scan
    // of all text blocks
    let blocks = scan(document)?;
    // Apply algorithm here
    //Ok(algorithm::all(blocks))
    Ok(algorithm::num_words(blocks))
}
pub fn unboilerplate ( document : & str ) -> Result < String , Error > { // pass 1 and 2: parse to html tree, naive scan // of all text blocks let blocks = scan ( document ) ? ; // Apply algorithm here //Ok(algorithm::all(blocks)) Ok ( algorithm :: num_words ( blocks ) ) }
public entrypoint.
public entrypoint .
document
&str
document
&str