public boolean process(TextDocument doc) throws BoilerpipeProcessingException { List<TextBlock> tbs = doc.getTextBlocks(); if (tbs.isEmpty()) { return false; } for (TextBlock tb : tbs) { tb.setIsContent(!tb.isContent()); } return true; }
public boolean process(TextDocument doc) throws BoilerpipeProcessingException { List<TextBlock> tbs = doc.getTextBlocks(); if (tbs.isEmpty()) { return false; } for (TextBlock tb : tbs) { tb.setIsContent(!tb.isContent()); } return true; }
public boolean process(TextDocument doc) throws BoilerpipeProcessingException { List<TextBlock> tbs = doc.getTextBlocks(); if (tbs.isEmpty()) { return false; } for (TextBlock tb : tbs) { tb.setIsContent(!tb.isContent()); } return true; }
public boolean process(TextDocument doc) throws BoilerpipeProcessingException { List<TextBlock> tbs = doc.getTextBlocks(); if (tbs.isEmpty()) { return false; } for (TextBlock tb : tbs) { tb.setIsContent(!tb.isContent()); } return true; }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (!tb.isContent()) { tb.setIsContent(true); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (tb.isContent()) { tb.setIsContent(false); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (!tb.isContent()) { tb.setIsContent(true); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (!tb.isContent()) { tb.setIsContent(true); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (tb.isContent()) { tb.setIsContent(false); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (tb.isContent()) { tb.setIsContent(false); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (!tb.isContent()) { tb.setIsContent(true); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (!tb.isContent()) { continue; } if (tb.getNumWords() < minWords) { tb.setIsContent(false); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (!tb.isContent()) { continue; } if (getNumFullTextWords(tb) < minWords) { tb.setIsContent(false); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (!tb.isContent()) { continue; } if (tb.getNumWords() < minWords) { tb.setIsContent(false); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (!tb.isContent()) { continue; } if (getNumFullTextWords(tb) < minWords) { tb.setIsContent(false); changes = true; } } return changes; } }
public boolean process(final TextDocument doc) throws BoilerpipeProcessingException { boolean changes = false; for (TextBlock tb : doc.getTextBlocks()) { if (!tb.isContent()) { continue; } if (tb.getNumWords() < minWords) { tb.setIsContent(false); changes = true; } } return changes; } }
protected boolean classify(final TextBlock prev, final TextBlock curr, final TextBlock next) { final boolean isContent = (curr.getLinkDensity() > 0 && next .getNumWords() > 11) || (curr.getNumWords() > 19 || (next.getNumWords() > 6 && next.getLinkDensity() == 0 && prev.getLinkDensity() == 0 && (curr .getNumWords() > 6 || prev.getNumWords() > 7 || next .getNumWords() > 19))); return curr.setIsContent(isContent); } };
protected boolean classify(final TextBlock prev, final TextBlock curr, final TextBlock next) { final boolean isContent = (curr.getLinkDensity() > 0 && next .getNumWords() > 11) || (curr.getNumWords() > 19 || (next.getNumWords() > 6 && next.getLinkDensity() == 0 && prev.getLinkDensity() == 0 && (curr .getNumWords() > 6 || prev.getNumWords() > 7 || next .getNumWords() > 19))); return curr.setIsContent(isContent); } };
protected boolean classify(final TextBlock prev, final TextBlock curr, final TextBlock next) { final boolean isContent = (curr.getLinkDensity() > 0 && next .getNumWords() > 11) || (curr.getNumWords() > 19 || (next.getNumWords() > 6 && next.getLinkDensity() == 0 && prev.getLinkDensity() == 0 && (curr .getNumWords() > 6 || prev.getNumWords() > 7 || next .getNumWords() > 19))); return curr.setIsContent(isContent); } };
protected boolean classify(final TextBlock prev, final TextBlock curr, final TextBlock next) { final boolean isContent = (curr.getLinkDensity() > 0 && next .getNumWords() > 11) || (curr.getNumWords() > 19 || (next.getNumWords() > 6 && next.getLinkDensity() == 0 && prev.getLinkDensity() == 0 && (curr .getNumWords() > 6 || prev.getNumWords() > 7 || next .getNumWords() > 19))); return curr.setIsContent(isContent); } };