Examples of StdoutTap


Examples of com.twitter.maple.tap.StdoutTap

  public static void followsManyFollowsConcise() {
    // this implementation uses Api.each to shorten the implementation
    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(Api.each(manyFollows), "?person1", "?person2")
        .predicate(Playground.FOLLOWS, "?person1", "?person2"));
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

        .predicate(Api.each(manyFollows), "?person1", "?person2")
        .predicate(Playground.FOLLOWS, "?person1", "?person2"));
  }

  public static void sentenceUniqueWords() {
    Api.execute(new StdoutTap(), new Subquery("?word").predicate(Playground.SENTENCE, "?sentence")
        .predicate(new Split(), "?sentence").out("?word").predicate(Option.DISTINCT, true));
  }
View Full Code Here

Examples of com.twitter.maple.tap.StdoutTap

    Api.execute(new StdoutTap(), new Subquery("?word").predicate(Playground.SENTENCE, "?sentence")
        .predicate(new Split(), "?sentence").out("?word").predicate(Option.DISTINCT, true));
  }

  public static void wordCount() {
    Api.execute(new StdoutTap(), new Subquery("?word", "?count")
        .predicate(Playground.SENTENCE, "?sentence").predicate(new Split(), "?sentence")
        .out("?word").predicate(new Count(), "?count"));
  }
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.