Tuesday, March 8, 2011

You've got to do it.

This goes out to everyone to everyone I know, but especially my friends in academia. I feel like the message of this song is what most meetings with advisors are about, but who can say it better than Mr. Rogers? Do yourself a favor, follow this link:
And listen to the song. Lyrics reposted here:

You've got to do it

by Fred Rogers

You can make believe it happens,
Or pretend that something's true.
You can wish or hope or contemplate
A thing you'd like to do.
But until you start to do it,
You will never see it through.
'Cause the make-believe pretending
Just won't do it for you

You've got to do it.
Every little bit
You've got to do it, do it, do it, do it
And when you're through,
You can know who did it,
For you did it, you did it, you did it.

If you want to ride a bicycle
And ride it straight and tall.
You can't simply sit and look at it
'Cause it won't move at all.
But it's you who have to try it.
And it's you who have to fall (sometimes)
If you want to ride a bicycle
And ride it straight and tall.

You've got to do it.
Every little bit
You've got to do it, do it, do it, do it
And when you're through,
You can know who did it,
For you did it, you did it, you did it.

It's not easy to keep trying
But it's one good way to grow.
It's not easy to keep learning
But I know that this is so.
When you've tried and learned
You're bigger than you were a day ago.
It's not easy to keep trying
But it's one way to grow.

You've got to do it.
Every little bit
You've got to do it, do it, do it, do it
And when you're through,
You can know who did it,
For you did it, you did it, you did it.

Monday, March 7, 2011

Most Typical Person

There has been an infographic video floating around which was put together by National Geographic called "7 Billion: Are You Typical?" Frankly, it bugs me a bunch on a few points.


I think this video plays too fast and loose with exceedingly simplistic statistical notions, resulting in simplistic results.

To begin with, the video asserts that the most typical human is a 28 year old Han Chinese man. Now, I'm not sure what they mean by "typical human." My default assumption would be that the most typical human traits would be ones which are most evenly distributed across the world. In fact, National Geographic is treating the world as a large, uniformly mixed urn of people, and if you were to randomly draw from that urn, a 28 year old Han Chinese man has the highest expectation.

Except, that's probably not true either. I've turned to Wolfram Alpha to check some global stats. And it is true that the global median age is about 28, the largest ethnic group is Han Chinese, and that 50.3% of the world population is male. However, the median age for men in China is 33.5 years. This "most typical" person is actually not especially typical for his country, based on this age pyramid.


It looks like if you were to randomly sample China, someone in the 20-24 year old age bin would be more typical than a 28 year old.

At some point, the video also says the most typical person in the world owns a cell phone. That doesn't appear to be true for China (.48 cell phones per capita), nor does it appear to be true for the world at large (.32 cell phones per capita). Maybe this is just an issue with differing data sources, or maybe National Geographic was playing some complicated word games. The actual line is "The most typical person has a cell phone, but not a bank account." Maybe what they mean is that if you were to place the world population into this table:


Bank Account No Bank Account
Cell Phone A B
No Cell Phone C D

cell B has the most people in it. But, that would be a strange thing to mean, especially because most people would fall into cells A, C and D. In that case, it would probably be more accurate to say that the most typical person either has both a cell phone and a bank account, or neither.

(Edit: Thinking about it now, if A+B = 32% according to Wolfram Alpha, then C + D = 68%, and there's no way to distributed 68% between those two cells so that they're both less common than B.)

Maybe this is all quibbling over details, but what does any of this video matter of the facts it gives are all a little off? I too could create an infographic video with flashy animation and an inspiring sound track (well, let's say I could, for the sake of argument), but with completely fabricated numbers. That video would not count for anything, because it matters whether the facts are true, and accurate.

So what is the point of this video? They tip their hand at the end. First, they say "typical is always relative," which is true, but they seem to be trying to deconstruct the notion that statistical generalizations are possible or useful. They end with talking about individual choices, and that "our choices make a big difference." Really, they seem to be pushing the idea that we are all individually the authors of global society, a notion that I find only slightly more plausible than the structure of the universe being moulded by our consciousness.

I read this as being a very American conception, and looking at the video again, it seems to really be all about contemporary American anxiety about the economic development of China and India.

Friday, February 25, 2011

Hand Coder Praat Script

I've written a Praat script for general hand coding of segmental variation, relying upon forced alignments produced by P2FA or FAAValign.

The most recent version of the script is available here:
https://github.com/JoFrhwld/FAAV/raw/master/praat/handCoder.praat

Background and documentation below.

Background


Recently, we hosted here at Penn a workshop on New Tools and Methods for Very-Large-Scale Phonetics Research. It was definitely my kind of workshop. The talks and the posters were all very high quality, and very interesting.

One tool that was featured rather prominently was the Penn Phonetics Lab Forced Aligner (P2FA). This tool takes as input a recording of speech, a transcription of the speech, and returns a word and phone level alignment of the transcription to the audio (please see the P2FA page for more details).

Of course, once you have a large corpus of time aligned transcription, the ideal thing to do is an automated analysis of the acoustic data. In fact, this is the goal of the FAAV project, which focuses on analyzing vowel formant data. The most recent version of our code to automatically analyze vowels is hosted here: https://github.com/JoFrhwld/FAAV/tree/master/extractFormants

However, for most purposes, there doesn't already exist an automated method for acoustic analysis. For example, if you wanted to study -ing ~ -in variation, or TD deletion, you would have to first build a classifier, which would require some hand coded data anyway.


Documentation

So, I've written an interactive Praat script that allows you to rather flexibly define segments to search for, narrow down the search context to specific word and segmental contexts, and define segmental contexts to exclude, as well as a list of stop words. Given an audio file, and the output of P2FA or FAAValign, the script will search for the specified contexts, play them, and allow you to enter a code. It will then write your code along with other important information about the token which can be used for analysis in and of itself, or as training data for a classifier.

Setup
Open a Long Sound file and a Text Grid into Praat. These two objects must have the same name. Next open handCoder.praat. To run the script, select Run>Run.



Defining the Search
A dialogue box will open, allowing you to define segments to search for, and refinements of the search context. The default settings are for coding TD deletion.
You can understand these settings this way:
  • Search objects with these names.
  • Send output to this file.
  • Search for T and D.
  • Restrict the search to word final contexts.
  • The segment must be preceded by a consonant.
  • No restriction on following context.
  • Exclude segments preceded by R.
  • Exclude segments followed by T, D, TH, DH, JH, and CH.
  • Exclude AND.
  • Play a window of 3 words preceding and following the word the segment is in.
  • There is no default code
These are what the settings from -ing, or str- coding would look like.


Coding
As the script runs, it will play segments of the audio surrounding segments which meet the search criteria. Then, the coding window will open. It contains two fields: one for codes, and one for comments. After entering codes and comments, hitting enter, or clicking on Continue will move along to the next segment.

Output
The output of this script is a tab delimited file with the following pieces of data for each segment.
  • Object name
  • Segment of focus
  • Word position of the segment
  • Code from the coding field
  • Time of segment start
  • Time of segment end
  • Word of focus
  • Word start
  • Word end
  • Preceding segment
  • Preceding segment start
  • Preceding segment end
  • Window duration
  • Vowels per second in the window
  • Comments

Feedback

Please feel free to contact me with any comments or question. You can find my e-mail on my website: http://www.ling.upenn.edu/~joseff/

Disqus for Val Systems