Tabnine Logo
DensityRulesClassifier
Code IndexAdd Tabnine to your IDE (free)

How to use
DensityRulesClassifier
in
de.l3s.boilerpipe.filters.english

Best Java code snippets using de.l3s.boilerpipe.filters.english.DensityRulesClassifier (Showing top 8 results out of 315)

origin: de.l3s.boilerpipe/boilerpipe

public boolean process(TextDocument doc)
    throws BoilerpipeProcessingException {
  List<TextBlock> textBlocks = doc.getTextBlocks();
  boolean hasChanges = false;
  ListIterator<TextBlock> it = textBlocks.listIterator();
  if (!it.hasNext()) {
    return false;
  }
  TextBlock prevBlock = TextBlock.EMPTY_START;
  TextBlock currentBlock = it.next();
  TextBlock nextBlock = it.hasNext() ? it.next() : TextBlock.EMPTY_START;
  hasChanges = classify(prevBlock, currentBlock, nextBlock) | hasChanges;
  if (nextBlock != TextBlock.EMPTY_START) {
    while (it.hasNext()) {
      prevBlock = currentBlock;
      currentBlock = nextBlock;
      nextBlock = it.next();
      hasChanges = classify(prevBlock, currentBlock, nextBlock)
          | hasChanges;
    }
    prevBlock = currentBlock;
    currentBlock = nextBlock;
    nextBlock = TextBlock.EMPTY_START;
    hasChanges = classify(prevBlock, currentBlock, nextBlock)
        | hasChanges;
  }
  return hasChanges;
}
origin: com.syncthemall/boilerpipe

  public boolean process(TextDocument doc)
      throws BoilerpipeProcessingException {

    return

    SimpleBlockFusionProcessor.INSTANCE.process(doc)
        | BlockProximityFusion.MAX_DISTANCE_1.process(doc)
        | DensityRulesClassifier.INSTANCE.process(doc);
  }
}
origin: de.l3s.boilerpipe/boilerpipe

  public boolean process(TextDocument doc)
      throws BoilerpipeProcessingException {

    return

    SimpleBlockFusionProcessor.INSTANCE.process(doc)
        | BlockProximityFusion.MAX_DISTANCE_1.process(doc)
        | DensityRulesClassifier.INSTANCE.process(doc);
  }
}
origin: pvdlg/boilerpipe

  public boolean process(TextDocument doc)
      throws BoilerpipeProcessingException {

    return

    SimpleBlockFusionProcessor.INSTANCE.process(doc)
        | BlockProximityFusion.MAX_DISTANCE_1.process(doc)
        | DensityRulesClassifier.INSTANCE.process(doc);
  }
}
origin: pvdlg/boilerpipe

public boolean process(TextDocument doc)
    throws BoilerpipeProcessingException {
  List<TextBlock> textBlocks = doc.getTextBlocks();
  boolean hasChanges = false;
  ListIterator<TextBlock> it = textBlocks.listIterator();
  if (!it.hasNext()) {
    return false;
  }
  TextBlock prevBlock = TextBlock.EMPTY_START;
  TextBlock currentBlock = it.next();
  TextBlock nextBlock = it.hasNext() ? it.next() : TextBlock.EMPTY_START;
  hasChanges = classify(prevBlock, currentBlock, nextBlock) | hasChanges;
  if (nextBlock != TextBlock.EMPTY_START) {
    while (it.hasNext()) {
      prevBlock = currentBlock;
      currentBlock = nextBlock;
      nextBlock = it.next();
      hasChanges = classify(prevBlock, currentBlock, nextBlock)
          | hasChanges;
    }
    prevBlock = currentBlock;
    currentBlock = nextBlock;
    nextBlock = TextBlock.EMPTY_START;
    hasChanges = classify(prevBlock, currentBlock, nextBlock)
        | hasChanges;
  }
  return hasChanges;
}
origin: Netbreeze-GmbH/boilerpipe

  public boolean process(TextDocument doc)
      throws BoilerpipeProcessingException {

    return

    SimpleBlockFusionProcessor.INSTANCE.process(doc)
        | BlockProximityFusion.MAX_DISTANCE_1.process(doc)
        | DensityRulesClassifier.INSTANCE.process(doc);
  }
}
origin: Netbreeze-GmbH/boilerpipe

public boolean process(TextDocument doc)
    throws BoilerpipeProcessingException {
  List<TextBlock> textBlocks = doc.getTextBlocks();
  boolean hasChanges = false;
  ListIterator<TextBlock> it = textBlocks.listIterator();
  if (!it.hasNext()) {
    return false;
  }
  TextBlock prevBlock = TextBlock.EMPTY_START;
  TextBlock currentBlock = it.next();
  TextBlock nextBlock = it.hasNext() ? it.next() : TextBlock.EMPTY_START;
  hasChanges = classify(prevBlock, currentBlock, nextBlock) | hasChanges;
  if (nextBlock != TextBlock.EMPTY_START) {
    while (it.hasNext()) {
      prevBlock = currentBlock;
      currentBlock = nextBlock;
      nextBlock = it.next();
      hasChanges = classify(prevBlock, currentBlock, nextBlock)
          | hasChanges;
    }
    prevBlock = currentBlock;
    currentBlock = nextBlock;
    nextBlock = TextBlock.EMPTY_START;
    hasChanges = classify(prevBlock, currentBlock, nextBlock)
        | hasChanges;
  }
  return hasChanges;
}
origin: com.syncthemall/boilerpipe

public boolean process(TextDocument doc)
    throws BoilerpipeProcessingException {
  List<TextBlock> textBlocks = doc.getTextBlocks();
  boolean hasChanges = false;
  ListIterator<TextBlock> it = textBlocks.listIterator();
  if (!it.hasNext()) {
    return false;
  }
  TextBlock prevBlock = TextBlock.EMPTY_START;
  TextBlock currentBlock = it.next();
  TextBlock nextBlock = it.hasNext() ? it.next() : TextBlock.EMPTY_START;
  hasChanges = classify(prevBlock, currentBlock, nextBlock) | hasChanges;
  if (nextBlock != TextBlock.EMPTY_START) {
    while (it.hasNext()) {
      prevBlock = currentBlock;
      currentBlock = nextBlock;
      nextBlock = it.next();
      hasChanges = classify(prevBlock, currentBlock, nextBlock)
          | hasChanges;
    }
    prevBlock = currentBlock;
    currentBlock = nextBlock;
    nextBlock = TextBlock.EMPTY_START;
    hasChanges = classify(prevBlock, currentBlock, nextBlock)
        | hasChanges;
  }
  return hasChanges;
}
de.l3s.boilerpipe.filters.englishDensityRulesClassifier

Javadoc

Classifies TextBlocks as content/not-content through rules that have been determined using the C4.8 machine learning algorithm, as described in the paper "Boilerplate Detection using Shallow Text Features", particularly using text densities and link densities.

Most used methods

  • classify
  • process

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JTable (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now