Skip to content

Instantly share code, notes, and snippets.

@samet
Created February 11, 2012 01:35
Show Gist options
  • Select an option

  • Save samet/1795023 to your computer and use it in GitHub Desktop.

Select an option

Save samet/1795023 to your computer and use it in GitHub Desktop.
KAT (Kaypakkaya Analysis Toolkit) - Processing Kutuphanesi
import wordcram.*;
import wordcram.text.*;
WordCram wordCram;
void setup() {
size(800, 600);
background(255);
colorMode(HSB);
initWordCram();
}
void initWordCram() {
wordCram = new WordCram(this)
.fromTextFile("/home/samet/kaypakkaya/hodo.txt")
.withStopWords("/home/samet/kaypakkaya/stopwords_yeni.txt")
.withFont(createFont("/home/samet/kaypakkaya/LiberationSerif-Regular.ttf", 1))
.sizedByWeight(10, 90)
.withColors(color(0, 250, 200), color(30), color(170, 230, 200));
}
void draw() {
wordCram.drawAll();
}
void mouseClicked() {
background(255);
initWordCram();
wordCram.drawAll();
save("/home/samet/kaypakkaya/wordle.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment