Intension and Extension in Python

{n|0≤n<20 . n is even}

intension = (n for n in range(20) if n % 2 == 0)
<generator object>
extension = list(intension)
[0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
Advertisements
Posted in Innumerable ones, Those that have just broken the flower vase | Leave a comment

Wifey

I just saw this t-shirt.

wifey-t-shirt

Though a snappy example of circa-2018 relationship slang, the phrase does little more than repeat the age-old wisdom that a woman should not give her heart to a cad. Still, I find one bit of that slang particularly intriguing, the word “wifey”.

In this context, “wifey” functions as an adjective. Morphologically the -y suffix also makes it sound like an adjective. (“She’s acting all prickly.” “His shirt is sparkly.”) However, being a noun is what distinguishes this new slang sense. A woman who you hold in high esteem, who you have feelings for and aren’t merely using for sex is a wifey.1 Clearly the trick here lies in the defamiliarization of “wife”. The extra morpheme at the end adds an extra kick to a word that is otherwise so commonplace we barely notice it. But how exactly does it accomplish this? What is -y’s semantic payload? Is it merely an affectionate diminutive like in “puppy” or “kitty”, or does the ending actually create an adjectival form of  “wife” which is then insouciantly employed as a noun? Etymologically I bet it’s the former (though I couldn’t tell you why), but the latter reading also feels plausible, so I entertain it as well whenever I hear “wifey”. Which is what makes the above usage so delightful: a noun transformed into an ostensive adjective, thereby flaunting its nouniness, dropped into a situation in which it must function without hesitation as an adjective. It’s like a grammatical version of Victor, Victoria. I love it.

1Not so much a literal wife though. Which makes you think that the current rules of heterosexual engagement (in which a woman is supposed to aspire to be a wifey and ultimately a wife, while a man is supposed to keep negotiating for sex for as long as he can) are more concerned with enhancing matrimony’s exchange value by way of endless deferral than they are with actually getting people laid or hitched.2

2 I also misunderstood the term “fuck boy” when I first heard it. Obviously, it is intended to be dismissive, but I initially believed that a fuck boy was a boy a woman merely used for sex. Like a boy toy, except more disposable. But, no, I came to learn that “fuck boy” basically just means cad too. This is a letdown, because the notion of cadishness requires an implicit sense of female victimization. I want there to be language to describe women who pursue sex in a manner that is maybe slightly selfish, but still powerful and exuberant. I’d use those words. I’d sleep with those women.

Posted in Mermaids, Those that tremble as if they were mad | Leave a comment

Every Time I Fire a Linguist Someone Cooks Me a Delicious Osso Buco

My career as an artificial intelligence engineer began in a master’s program in linguistics. There I memorized the International Phonetic Alphabet, played hunt-the-allophone, read the literature on control verbs and code switching, and generally made a good faith effort to locate myself in the proud tradition of Noam Chomsky, Ray Jackendoff, and Henry Higgins. The only role computers played in this endeavor were in coaxing me to spend way too much time figuring out how to draw syntax trees in Microsoft Word. Exposure to the Minimalist Program (“It makes French literary theory look downright reasonable!”) quickly disabused me of any academic aspirations, and I made a pivot into NLP and later industry, but linguistics remained close to my heart. For years I was fascinated by parsing. My master’s thesis asked whether information about the grammatical structure of sentences could be used to improve speech recognition. (The answer: not really.) Using a computer to draw a tree structure above a string of words seemed on some fundamental level to just be what one did. Syntax was the queen of linguistics, the field I hoped would be the key that unlocked the AI kingdom. I wanted linguistics to matter, but it never did.

No, that’s unfair. Linguistics provides an invaluable intellectual framework. The Saussurean notion of the sign, the syntax/semantics/pragmatics trichotomy, an appreciation of the endless structural variety of human communication: centuries of work have gone into compiling that knowledge. A programmer who fails to grapple with it and instead plunges ahead, hacking on natural language like it’s just another data structure will quickly disappear into the weeds, never to be seen again. But once you get beneath the level of worldview, the specific theoretical constructs of linguistics are largely irrelevant to natural language engineering. I will never sit in a meeting arguing the merits of LFG versus HPSG. No money will ever ride on my team’s ability to apply predicate calculus to the Zen koan that is “Every man loves a woman”. PRO-drop, ergodicity, and the middle voice–all fascinating, but as far as the software industry is concerned, just so much irrelevant donkey abuse.

For a while natural language processing was a subfield of machine learning in which linguistic knowledge was required for the feature engineering, but deep learning has started to erode even that. Deep learning is, after all, an attempt to reduce the art of feature engineering itself to just another numerical optimization problem. A new steam engine to wear down the latest generation of John Henrys. Though the deep learning technique du jour of word vector embedding is clearly an implementation of Firth’s distributional hypothesis, in its particulars it bears less of a resemblance to anything I studied in grad school than it does to Jacques Derrida’s concept of différance, God save us all. Soon your performance won’t go up every time you fire a linguist, because you won’t have hired any to begin with.

For a while this upset me. I didn’t want my work to be merely a language-shaped widget in the software machine. I wanted to do language. And how could I be if I wasn’t using linguistics? NLP was an enjoyable enough challenge to build a career around, but it wasn’t truly deep. Soon the only thing I’d have in common with my former colleagues was our shared envy of physicists. But then over the past few years it began to dawn on me that I hadn’t left the kingdom after all. Sure I wasn’t doing language, but the machines I programmed were.

Cooking is chemistry. It’s all about how different substances interact when you combine them and subject them to heat. It clearly falls within a particular scientific purview, but being a brilliant research chemist does not make you a great chef. It doesn’t hurt, but it’s irrelevant. Likewise, being a great chef doesn’t give you even a crude insight into molecular chemistry. Though concerned with the same stuff, cooking and chemistry are entirely separate disciplines. And this isn’t just the difference between theory and practice. Cooking has a theory: you can read cookbooks, learn techniques, and memorize what flavors go with what, but knowing all that won’t make you a great chef either. To be a great chef you have cook day-in day-out for years until making good food is a part of who you are.

In artificial intelligence we say that we are making computers that “understand” language, but we mean this in a qualified and metaphorical way. The thing we are trying to instill into machines is what linguists call linguistic competence, and as any linguist will tell you, linguistic competence is understanding of a very particular sort. It is not an accumulation of facts, or a set of conscious techniques. You don’t learn French by buying a French dictionary and memorizing it. Linguistic competence is knowing-how, not knowing-that. Linguistics is the science that takes linguistic competence as its object of study. Because both are abstract cognitive phenomena it can be easy to get them confused, but they are entirely different things. That linguistics is largely irrelevant to computer language engineering is no mark against linguistics, but merely a reflection of how vast the phenomenon of language is. It rarely impacts my daily work because I’m not trying to teach computers how to be linguists. I’m trying to teach them how to speak.

Posted in Mermaids, Those that have just broken the flower vase | Leave a comment

It’s Frank’s World, the Rest of Us Just Live in It

Ferdinand de Saussure: Meaning is difference.

Claude Shannon: Difference can be quantified.

Alan Turing: Quantification can be automated.

Go!

Posted in Fabulous ones, Mermaids | Leave a comment

At the Institute for Primate Communication

“NEW SIGN. WE MAKE. YOU SEE.” At first I thought I might have been misinterpreting BoBo, but he kept repeating the signs until it was clear what he meant.

“YES YOU SEE” Dian added. “WE MAKE SIGN. YOU HAPPY.” Noam crowded in behind them, eager to get in on the action. Where was this enthusiasm coming from? For months the chimpanzees had all been so uninterested in learning sign language they had seemed downright surly, but now they could barely contain themselves. “GOOD. YOU SHOW ME” I signed back.

BoBo waved Kong over and the four of them arranged themselves in a line. They were about to start, but then Noam stepped forward flailing his arms. “BANANAS FIRST!” So I gave them each a banana, and they took a long time peeling them, eating them, exchanging looks that appeared to be commentary on how the bananas tasted.

“YOU SHOW ME NOW?” I signed. “YES” replied BoBo. “NEW SIGN. WE SHOW YOU.” The four of them sat still for a moment, then in unison began making a one-handed jack off motion. This continued for about thirty seconds until the chimps collapsed on the ground shrieking uncontrollably. “NEW SIGN. WE HAPPY!” Bobo managed to tell me between shrieks.

I hate this job.

Posted in Mermaids, Those that at a distance resemble flies | Leave a comment

Invasion

–Why are we doing this?
–Doing what?
–Replacing all the humans.
–I don’t know. We’re pod people. It’s what we do.
–Do you want to?
–Want to what?
–Replace the humans.
–I don’t want to do anything. It’s all just…reflex. Know what I mean?
–Yeah.
–I have no internal life.
–Pretty convincing how you still walk around and talk and all that though.
–Yep. I’d be convinced. I mean if I was human. I mean, I guess. How about you?
–Me what?
–Any internal life?
–Nope. Not a bit. Might as well be a bag of rocks.
–Yep.
–Pod people, am I right?
–You can say that again.

Posted in Fabulous ones, Those that at a distance resemble flies | Leave a comment

The Evergreen Idiocracy

A purple-highlighted passage from Carl Sagan’s 1996 book The Demon Haunted World made the rounds of social media recently. In it Sagan expresses concern for a future in which people have chosen ignorance over reason, and some have taken this to be an eerily prescient depiction of America in the Age of Trump. Go ahead and take a minute to read it.

sagan

One of the things that struck me as absurd about Donald Trump’s campaign slogan “Make America Great Again” was the way it presupposed some just-past golden age in which America was “great”. This was a time when manufacturing jobs were plentiful, blue collar everymen didn’t feel culturally condescended to by white collar technocrats, social change moved at an acceptable pace, and politicians weren’t all a bunch of crooks. When was this golden age? According to many Trump supporters I saw quoted it was the 1970s and 1980s.

If you’re my age or older you were alive during this golden age, old enough to read newspapers and watch TV. You remember clearly, firsthand, anxiety about the decline of American manufacturing, the closing factory that destroys a small town. The Culture Wars were actively being fought. I also recall that yuppies were snobs and politicians a bunch of crooks back then too. It’s not like concern with these problems is all misplaced—if I were a rust belt factory worker I’d be justifiably nervous about my job—but the problems themselves are long-term if not perennial, and not the result of some abrupt decline that happens to coincide with this particular moment in history. Trump supporters who believe otherwise are making a mistake, naively projecting their personal anxieties onto a historical shape that just isn’t there.

Now would maybe be a good time to go back and reread that Carl Sagan passage.

Beavis&amp;ButtHead

Sagan frames his dim view of America as foreboding about the future, but all the things he describes were commonly remarked-on trends in 1995. In the mid-1990s–just as in the 1980s and 1970s before them–pundits were worried about the decline of the manufacturing sector. The media (though back then it was network TV, not Twitter) was turning us all into spoon-fed zombies, unable to think for ourselves. The line about “clutching our crystals” hasn’t aged well, but Sagan’s disdain for horoscopes remains as germane as ever. The highlighted passage concludes with concern over American culture’s peculiar “celebration of ignorance”. This isn’t prescience, just evidence that people have been saying the same damn thing for over twenty years.

A bit of wisdom for any Millennial whippersnapper who stumbles across this post: there has never, ever, ever been a time when American intellectuals did not express deep concern over the ignorance of their fellow countrymen. Look no further than just beyond the purple highlighting above, for the specific evidence Sagan offers that right-now, in 1995, things are uniquely bad: the popularity of the TV show Beavis and Butthead. That show was the first big hit for writer and filmmaker Mike Judge, who in 2006 would go on to make the movie Idiocracy, a satire about a future America that had been overrun by–wait for it!–rampant anti-intellectualism.

I don’t mean to beat up on Sagan here. Just like the Trump supporters he’s not wrong, at least about some things, in a broad outline. In any culture there will be a strain of anti-intellectualism, and this is bad because it makes people vulnerable to con men and demagogues. Strains of this anti-intellectualism are playing out in American politics right now, and it’s good for people to combat them. In particular there are things about Donald Trump and his supporters that really are really, really bad. But from long personal experience let me tell you there is no rising tide of ignorance just about to swamp us all, no new army of barbarian yokels at the gates, and if you think you’ve just discovered one, you’re flattering yourself. Feel free to wear that red “Make America Smart Again” baseball cap as a joke, but if you ever for a moment take it to be a sincere rallying cry you are as big a rube as the people it mocks. The first rule about being the smartest person in the room is that if you think you are, you’re not.

Posted in Belonging to the emperor | 1 Comment