Skip to main content

Posts

Showing posts from 2015

Canterbury Tales Neural Network

I trained another RNN (multi-layer recurrent neural network), this time to generate poems in Middle English in the style of Canterbury Tales. It started generating interesting stuff after just a few minutes of training, but I let it finish anyway. I noticed in one of the samples that it had generated a title, so I seeded it with that title, and sure enough, it closed the poem eventually and started a new one. Kinda cool. The numbers are line numbers (you can see they're obviously not accurate), and it generates footnotes, too, since they were in the source text. The indentation and spacing is all generated by the neural net, too. AUCCIATES TALE,   This walmeth have,' quod Melibee, 'by see                   760   For it was grave, and of my voys I may,   To hir, with-outen fond to wedden she                         285   How that a man unto pituk than;                              1160   Til that were I his messaille aboghnis.   For, in the sovereyntes ful m

A neural network that writes Scalia dissents

I trained a recursive neural network ( https://github.com/karpathy/char-rnn ) on a bunch of Justice Scalia's dissents from the past few years. It spits out some amusing stuff, depending on the starter text and how "adventurous" you want the output. Since it's character-based and not word-based, it makes a bunch of spelling errors (unlike Justice Scalia), but is also able to create new words (just like Justice Scalia!). Here are some samples. *** Starter text: "Justice SCALIA", random level: 0.8. Never would have expected this from a strict constructionist (check the first sentence). This one brings in same-sex marriage, constitutional interpretation, and the typical contempt-ridden air quotes. "Justice SCALIA, dissenting.  The Constitution is an opinion, and so views that "[t]he Court tait the structure relations (interneline) rejectly and weands is not categorical, while all this one inference to do be not applying a nample between the

Stuttering in Korea

I had given up on English. It's my native language, but I figured after 30 some-odd years of disfluent speech, it was time to try something else. So I signed up for language classes in Korean, rationalizing that if I was going to try to teach myself how to speak, I might as well learn a new language along the way. This might seem completely insane, but when the prevailing theme of your conscious thoughts for multiple decades is some variant of "Why can't I say what I want to say?", you come up with lots of crazy ideas. For background, I've been a person who stutters for my entire life. I wrote about it on this blog a few years ago, so I think it's time for a followup. I've learned a lot since then, about myself and about stuttering, but in this post I simply want to give some insight into what it's actually like to stutter, and how my speech has changed over time. After the last stuttering post, the predominant reaction I got from friends was ei

Learn Korean via Indie Music

Korea might sometimes seem to be a ginormous, wildly successful pop music factory , but unbeknownst to most foreigners, it actually has an amazing indie music scene as well. A couple days ago, while sipping coffee and working at a nearby cafe, I heard an indie song that I used to like a couple years ago. It's also an amusing example of blatant product placement-based advertising - the entire music video is about this new phone and how it brings this couple together. My favorite is part is when the iPhone falls on the floor and breaks, so she needs to replace it with the Korean phone. Have a watch: Anyway, I thought it might be fun to use the lyrics for a quick Korean lesson, so here goes! Verse 1: 나 그대가 너무 좋은데 말하고 싶은데 용기가 안나 나도 그대가 너무 좋은데 말하고 싶은데 용기가 안나 Let's take a look at the first sentence, which is "나 그대가 너무 좋은데 말하고 싶은데 용기가 안나". Man, we can learn so much from this. First, the meaning: Literal: "I want to say that you're too good, but coura

A Moment of Serenity

I've dabbled on and off with meditation for years. I've never gotten good at it, and I haven't put a solid effort into learning, but I find it interesting and enjoyable nonetheless. My first exposure came at a gymnastics camp during middle school, when we were led through relaxation/visualization exercises as part of the camp activities. It wasn't called meditation, probably because meditation is a loaded word that turns a lot of people off, but that's what it was. Meditation just means being present. It means slowing down the relentless stream of thoughts that pass through the mind's eye. If you can slow down your racing mind enough to engineer a pause in the stream and a realization that you're watching your own thoughts, then you're meditating. Congratulations. There's nothing magical or mystical or religious about meditation. It's simply an awareness of your own mind and a break from the constant bombardment of conscious and subconscious th

The Problem With "Everyone Should Learn How To Code"

Every week another article comes out frantically telling us that everyone should learn to code, that coding is an irreplaceable skill in the 21st century skill set, that you can supercharge your career if you just spent 20 minutes a day for 21 days to learn how to code, or some similar nonsense. Even Obama has joined in, stating on a number of occasions that "Everybody's gotta learn how to code." While the intent is often good, I think these sentiments are dangerous for a number of reasons, but mostly because they cheapen coding and show a complete lack of understanding about what it is. The problem with "everyone should learn how to code, just like everyone should learn how to read and learn how to do arithmetic" is that fundamentally, coding is not arithmetic. It's not even like arithmetic. It's not like reading. And by comparing coding to the fundamental skills that form the lowest possible foundational step of intellectual pursuits (e.g., you can&

English Lesson: "한국에 오신지 얼마나 됐어요?"라고 영어로?

I've lost count of how many times Koreans have asked me the question, "How long do you stay in Korea?" in those words or something very similar. Clearly this question is taught in every English class in Korea, because I hear it over and over again, so I just wanted to be very clear about something here: DO NOT USE THIS EXPRESSION. IT IS INCORRECT. This phrase is incorrect for a few reasons, but primarily because it sounds ambiguous to native English speakers. Specifically, there are probably two different questions that you really want to ask: 1) How long have you been in Korea? (한국에 오신지 얼마나 됐어요?) 2) How long will you stay in Korea? (한국에 얼마나 있을 거예요?/한국에 얼마동안 있을 계획이에요?) Nearly always the intended question is number 1, "How long have you been in Korea?", followed afterwards by number 2, "How long will you stay in Korea?". But the incorrectly stated question ambiguously sounds somewhere in between number 1 and number 2. So, don't ever use it

How to Gossip in Korean

If I had to choose an aspect of Korean grammar that is absolutely essential yet is misunderstood or often misused by most foreign learners of Korean, it would be quoted/reported text. In other words, talking about what other people said. "She said she'd arrive by eight, but she's still not here yet." "They say it's going to be really cold tomorrow." "You asking me if I know what I'm doing?" "The teacher says to shut up and start doing your homework." Stuff like that. We use these expressions in nearly every single conversation we have, yet the way this grammar is formed in Korean is so different than English that I see many foreign learners of Korean simply give up and never learn it properly. Lucky for you, today I'm going to teach you this grammar, and you'll find that it's really not so hard after all! First off, forget the way this works in whatever language you speak. Because Korean is not English, it's no