Examples of StdoutTap


Examples of cascalog.StdoutTap

  public static void main( String[] args ) {
    Tap inputTap = new Hfs( new TextDelimited(
                                new Fields("docid", "body"), "\t" ),
                            args[0] );
    Tap outputTap = new StdoutTap();

    // create the flow
    Flow simhashFlow = Simhash.simhash(inputTap, outputTap,
                                       2, // combine n-th lowest minhashes (e.g. 2)
                                       SimpleSimhash.Tokenizer.class);
View Full Code Here

Examples of cascalog.StdoutTap

  public static void main( String[] args ) {
    Tap inputTap = new Hfs( new TextDelimited(
                                new Fields("docid", "body"), "  " ),
                            args[0] );
    Tap outputTap = new StdoutTap();

    // create the flow
    Flow simhashFlow = Simhash.simhash(inputTap, outputTap, 1, HtmlText.tokenizer(3));
    simhashFlow.complete(); // or add to your Cascade, etc
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

import jcascalog.op.Multiply;


public class Examples {
  public static void twentyFiveYearOlds() {
    Api.execute(new StdoutTap(), new Subquery("?person").predicate(Playground.AGE, "?person", 25));
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

  public static void twentyFiveYearOlds() {
    Api.execute(new StdoutTap(), new Subquery("?person").predicate(Playground.AGE, "?person", 25));
  }

  public static void lessThanThirtyYearsOld() {
    Api.execute(new StdoutTap(), new Subquery("?person")
        .predicate(Playground.AGE, "?person", "?age").predicate(new LT(), "?age", 30));
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

    Api.execute(new StdoutTap(), new Subquery("?person")
        .predicate(Playground.AGE, "?person", "?age").predicate(new LT(), "?age", 30));
  }

  public static void lessThanThirtyYearsOldWithAge() {
    Api.execute(new StdoutTap(), new Subquery("?person", "?age")
        .predicate(Playground.AGE, "?person", "?age").predicate(new LT(), "?age", 30));
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

    Api.execute(new StdoutTap(), new Subquery("?person", "?age")
        .predicate(Playground.AGE, "?person", "?age").predicate(new LT(), "?age", 30));
  }

  public static void doubleAges() {
    Api.execute(new StdoutTap(), new Subquery("?person", "?double-age")
        .predicate(Playground.AGE, "?person", "?age").predicate(new Multiply(), "?age", 2)
        .out("?double-age"));
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

        .predicate(Playground.AGE, "?person", "?age").predicate(new Multiply(), "?age", 2)
        .out("?double-age"));
  }

  public static void distinctPeopleFromFollows() {
    Api.execute(new StdoutTap(), new Subquery("?person")
        .predicate(Playground.FOLLOWS, "?person", "_").predicate(Option.DISTINCT, true));
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

    Api.execute(new StdoutTap(), new Subquery("?person")
        .predicate(Playground.FOLLOWS, "?person", "_").predicate(Option.DISTINCT, true));
  }

  public static void nonDistinctPeopleFromFollows() {
    Api.execute(new StdoutTap(), new Subquery("?person")
        .predicate(Playground.FOLLOWS, "?person", "_"));
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

    Api.execute(new StdoutTap(), new Subquery("?person")
        .predicate(Playground.FOLLOWS, "?person", "_"));
  }

  public static void malePeopleEmilyFollows() {
    Api.execute(new StdoutTap(), new Subquery("?person")
        .predicate(Playground.FOLLOWS, "emily", "?person")
        .predicate(Playground.GENDER, "?person", "m"));
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

  }

  public static void followsManyFollows() {
    Subquery manyFollows = new Subquery("?person").predicate(Playground.FOLLOWS, "?person", "_")
        .predicate(new Count(), "?count").predicate(new GT(), "?count", 2);
    Api.execute(new StdoutTap(), new Subquery("?person1", "?person2")
        .predicate(manyFollows, "?person1").predicate(manyFollows, "?person2")
        .predicate(Playground.FOLLOWS, "?person1", "?person2"));
  }
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.