Examples of LinkDatum


Examples of org.apache.nutch.scoring.webgraph.LinkDatum

      }

      if (urls.size() > 0) {
        float score = (node != null) ? node.getInlinkScore() : 0.0f;
        for (String url : urls) {
          LinkDatum datum = new LinkDatum(key.toString());
          datum.setScore(score);
          output.collect(new Text(url), datum);
        }
      }
    }
View Full Code Here

Examples of org.apache.nutch.scoring.webgraph.LinkDatum

      // assign the node
      while (values.hasNext()) {
        ObjectWritable objWrite = values.next();
        Object obj = objWrite.get();
        if (obj instanceof LinkDatum) {
          LinkDatum next = (LinkDatum)obj;
          String anchor = next.getAnchor();
          if (anchor != null) {
            anchor = anchor.trim();
          }
          if (ignoreEmptyAnchors && (anchor == null || anchor.length() == 0)) {
            continue;
View Full Code Here

Examples of org.apache.nutch.scoring.webgraph.LinkDatum

        // collect to maximum number of inlinks
        int numToCollect = (maxInlinks > anchors.size() ? anchors.size()
          : maxInlinks);
        for (int i = 0; i < numToCollect; i++) {
          LinkDatum datum = anchors.get(i);
          FieldWritable anchorField = new FieldWritable(Fields.ANCHOR,
            datum.getAnchor(), FieldType.CONTENT, true, stored, tokenize);
          output.collect(key, anchorField);
        }
      }
    }
View Full Code Here

Examples of org.apache.nutch.scoring.webgraph.LinkDatum

      }

      if (urls.size() > 0) {
        float score = (node != null) ? node.getInlinkScore() : 0.0f;
        for (String url : urls) {
          LinkDatum datum = new LinkDatum(key.toString());
          datum.setScore(score);
          output.collect(new Text(url), datum);
        }
      }
    }
View Full Code Here

Examples of org.apache.nutch.scoring.webgraph.LinkDatum

      // assign the node
      while (values.hasNext()) {
        ObjectWritable objWrite = values.next();
        Object obj = objWrite.get();
        if (obj instanceof LinkDatum) {
          LinkDatum next = (LinkDatum)obj;
          String anchor = next.getAnchor();
          if (anchor != null) {
            anchor = anchor.trim();
          }
          if (ignoreEmptyAnchors && (anchor == null || anchor.length() == 0)) {
            continue;
View Full Code Here

Examples of org.apache.nutch.scoring.webgraph.LinkDatum

        // collect to maximum number of inlinks
        int numToCollect = (maxInlinks > anchors.size() ? anchors.size()
          : maxInlinks);
        for (int i = 0; i < numToCollect; i++) {
          LinkDatum datum = anchors.get(i);
          FieldWritable anchorField = new FieldWritable(Fields.ANCHOR,
            datum.getAnchor(), FieldType.CONTENT, true, stored, tokenize);
          output.collect(key, anchorField);
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.