Extracting words
String[] txt;
String[] words;
String[] fiveCharWords;
void setup() {
txt = loadStrings("meditations.txt");
String fulltext = join(txt, " ");
fulltext = fulltext.replace(".", "");
fulltext = fulltext.replace("?", "");
fulltext = fulltext.replace("!", "");
fulltext = fulltext.replace(",", "");
fulltext = fulltext.replace(";", "");
fulltext = fulltext.replace("(", "");
fulltext = fulltext.replace(")", "");
fulltext = fulltext.replace("-", "");
words = fulltext.split(" ");
for (int i = 1; i < 12; i++) {
PrintWriter output;
output = createWriter("out/" + i + ".txt");
for (int j = 0; j < words.length; j++) {
if (words[j].length() == i) {
output.println(words[j]);
}
}
}
saveStrings("out/all.txt", words);
}
0 comments so far. Click here to share your thoughts.
Related

Creative Coding Barcelona
Community

A conversation with Yannick Gregoire
Conversations

Lena Weber on Ambiguous Aesthetics
Conversations

Martin Lorenz on the intersection of Creative Coding and Flexible Visual Systems
Community Conversations

DEMO Festival 2022 was a blast
Writings

Key visual for Slate + Ash’s new software instrument
Commissions Projects

Generative portraits for IBM
Commissions Projects

Llum Negra / La Luz Negra / Black Light
Commissions Projects

What is Creative Coding?
Writings

Creative Coding as an Experience
Writings

Workshop: “Algorithmic Adventures” at International Assembly
Workshops

An ode to the Gif
Writings

Curating the DESIGN IN MOTION Festival 2022
unlisted

A conversation with Yehwan Song
Community Conversations

We need a sustainable perspective on life with technology
Writings

The best programming language for Creative Coding in 2022
unlisted

“The Infinite Layout Machine” by Michael Kreß
Community Student Work

PCD2021 – Q&A with Casey Reas
Community Conversations

PCD2021 – Vera van de Seyp
Community Conversations

Two Perspectives – Episode 3
Community Conversations

Processing-Tutorial: A Grid of Arcs
Tutorials

Processing-Tutorial: Exploring Wave-Figures
Tutorials

Interactive Grid System (Livestream)
Tutorials

The Hidden Benefits of Learning to Code
unlisted

Creative Coding Manifesto 2021
Writings

New Course: Bauhaus Coding Workshop
unlisted

Learnings from the Bauhaus about Art and Technology
Writings

Constants & Variables
Community Conversations

TypeMachines – A workshop at écal Lausanne
Workshops

My Story (Part 1)
Writings

Processing-Tutorial: Rasterize 3D
Tutorials

Processing-Tutorial: Image-Rasterizer
Tutorials

Processing-Tutorial: Kinetic Typography 1
Tutorials

4 alternative, free and well-curated resources for images, fonts and data
unlisted

Protected: A conversation with Soyun Park
Conversations
