GithubHelp home page GithubHelp logo

programming-from-a-to-z / a2z-f18 Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 20.0 85.35 MB

ITP A2Z Course for Fall 2018

License: MIT License

HTML 0.62% CSS 0.01% JavaScript 99.36% Processing 0.01%
javascript machine-learning natural-language-processing p5js text text-analysis

a2z-f18's Introduction

Programming-from-A-to-Z

(or Everything you wanted to know about text but were afraid to ask.)

(or How i learned to stop worrying and love the javascript.)

What can computation add to human communication? Creating computer applications, instead of just using them, will give you a deeper understanding of the essential possibilities of computation. The course focuses on the fundamentals of programming the computer in the context of language and words. We'll explore topics ranging from evaluating text according to its statistical properties to the automated production of text with probabilistic methods to text visualization. Students will learn the JavaScript programming languages and develop projects that can be shared and interacted with online. The end of the semester is spent developing an idea for a final project and implementing it using computer programming.

Week 1 -- Introduction

  • Why are we here? What is computational media? What is programming? What is it good for? What kinds of programming languages are there?
  • What makes up a web page
    • Structure: HTML
    • Style: CSS
    • Behavior: JavaScript
  • Server-side vs. client programming

Week 2 -- Generate text automatically

  • basic HTML/CSS
  • variables
  • simple objects
  • Strings

Week 3 -- Make text interactive

  • conditionals
  • simple functions

Week 4 -- ??????

  • more about functions and objects

Week 5 -- Make lots and lots of text

  • arrays

Week 6 -- Regular Expressions

Week 7 -- Generating Text - PROJECT 1

  • Markov
  • Context Free Grammar

Week 8 -- Analyzing Text - PROJECT 2

  • concordance
  • visualization / drawing

Week 9 -- Bonus Topics

Week 10 -- Propose Final Projects

Week 11 -- One on one speed user testing / feedback

Week 12 -- Final Project Presentations

a2z-f18's People

Contributors

shiffman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

a2z-f18's Issues

Revamp Twitter Bot Assignment

Given Twitter's recent changes in its API policies and procedures, I would like to look into using other platforms for text / image based bots. Mastodon?

REGEX used to split accented characters

As always, thanks for sharing all this code!

While using it with a spanish text, I found that it didn´t work because of special characters. In concordance.js we have this code splitting the array

// Splitting up the text
        split(text) {
            // Split into array of tokens
            return text.split(/\W+/);
        }

Unfortunately, accented (diacritic) characters are also non-alphanumeric, so word like "selección" and "niño" get chopped into "selecci", "n", "ni", "o" by using that REGEX.

I found a workaround, by using match instead of split

var re = /\S+\s*/g;
tokens = allwords.match(re);

This of course required me to also change the previous code a bit, into

txt = loadStrings('preguntas/todas.txt');
allwords = txt.join("\n");

My proposed solution is not very good either, because after splitting into tokens, I still had to hand clean for many other non-alphanumeric characters, whitespace, line breaks, etc. But that was done while "sanitizing" each word before adding it into keys, and counts. For example

for (var i = 0; i < tokens.length; i++) {
        var word = tokens[i].toLowerCase();

        // Clean some more
         word = word.replace("(", "");
         word = word.replace(")", "");
         word = word.replace(".", "");
         word = word.replace(finBlanco, "");
         word = word.replace(/(\r\n|\n|\t|\r)/gm, "");



        if (!/\d+/.test(word)) {                     // is not a number
            if (sw.indexOf(word) == -1) {            // is not a stop word within a custom sw array
                if (counts[word] === undefined) {    // is a new word
                    counts[word] = 1;
                    keys.push(word);
                } else {
                    counts[word]++;
                }
            }
        }
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.