From 91ff8014e0e794b5fb030eb89b331f9c76902c66 Mon Sep 17 00:00:00 2001 From: Jer Thorp Date: Mon, 29 Sep 2014 14:39:28 -0400 Subject: [PATCH] Class 4. Former-commit-id: eaadb2bb48b5bfd43c93ac24e5e6b0fc41535b24 [formerly eaadb2bb48b5bfd43c93ac24e5e6b0fc41535b24 [formerly dda932ebafb414f44c50c9a296865c0b152dc692]] Former-commit-id: 160d371f54e75dad0cfefc91045752b105e83a9d Former-commit-id: a4524cb95f949131911cc5ca2392b869245952af --- .../Code/TweetMarkov/TweetMarkov.pde | 24 +++++++++++++++++++ .../data/tweets.txt.REMOVED.git-id | 1 + .../Code/TwitterPull/hong kong.txt | 0 .../Code/TwitterPull/selfie.txt | 0 data/oscars.txt.REMOVED.git-id | 1 + 5 files changed, 26 insertions(+) create mode 100644 2_Text_and_Archive/Code/TweetMarkov/TweetMarkov.pde create mode 100644 2_Text_and_Archive/Code/TweetMarkov/data/tweets.txt.REMOVED.git-id create mode 100644 2_Text_and_Archive/Code/TwitterPull/hong kong.txt create mode 100644 2_Text_and_Archive/Code/TwitterPull/selfie.txt create mode 100644 data/oscars.txt.REMOVED.git-id diff --git a/2_Text_and_Archive/Code/TweetMarkov/TweetMarkov.pde b/2_Text_and_Archive/Code/TweetMarkov/TweetMarkov.pde new file mode 100644 index 0000000..54875a4 --- /dev/null +++ b/2_Text_and_Archive/Code/TweetMarkov/TweetMarkov.pde @@ -0,0 +1,24 @@ +import rita.*; + +RiMarkov markov; +String[] lines = {"press the mouse!"}; + +void setup() { + size(1280,720,P3D); + + markov = new RiMarkov(2); + markov.loadFile(sketchPath + "/data/tweets.txt"); +} + +void draw() { + background(0); + textSize(24); + text(lines[0], 50, 250,600,300); +} + +void mousePressed() { + lines = markov.generateSentences(1); + println(lines[0]); +} + + diff --git a/2_Text_and_Archive/Code/TweetMarkov/data/tweets.txt.REMOVED.git-id b/2_Text_and_Archive/Code/TweetMarkov/data/tweets.txt.REMOVED.git-id new file mode 100644 index 0000000..a887485 --- /dev/null +++ b/2_Text_and_Archive/Code/TweetMarkov/data/tweets.txt.REMOVED.git-id @@ -0,0 +1 @@ +a239ba4b1f7f159f5a037f7de8e9151dc4b2801b \ No newline at end of file diff --git a/2_Text_and_Archive/Code/TwitterPull/hong kong.txt b/2_Text_and_Archive/Code/TwitterPull/hong kong.txt new file mode 100644 index 0000000..e69de29 diff --git a/2_Text_and_Archive/Code/TwitterPull/selfie.txt b/2_Text_and_Archive/Code/TwitterPull/selfie.txt new file mode 100644 index 0000000..e69de29 diff --git a/data/oscars.txt.REMOVED.git-id b/data/oscars.txt.REMOVED.git-id new file mode 100644 index 0000000..dd9c865 --- /dev/null +++ b/data/oscars.txt.REMOVED.git-id @@ -0,0 +1 @@ +b341c2edb45d70703860279af7e385a3ef3d3964 \ No newline at end of file