Skip to content

Instantly share code, notes, and snippets.

@primaryobjects
Created June 1, 2015 15:22
Show Gist options
  • Select an option

  • Save primaryobjects/2d4bcdcae0b0316bc642 to your computer and use it in GitHub Desktop.

Select an option

Save primaryobjects/2d4bcdcae0b0316bc642 to your computer and use it in GitHub Desktop.
Example of running LDA on Wikipedia article, using node.js lda library https://github.com/primaryobjects/lda.
var lda = require('lda'),
fs = require('fs');
// Read document (source from random Wikipedia page http://en.wikipedia.org/wiki/Harry_Anderson).
fs.readFile('doc.txt', 'utf8', function(err, data) {
if (err) {
throw err;
}
else {
// Extract sentences.
var documents = data.match( /[^\.!\?]+[\.!\?]+/g );
// Run LDA to get terms for 2 topics (5 terms each).
var result = lda(documents, 2, 5);
console.log(result);
}
});
Harry Anderson was born October 14, in Newport, Rhode Island. His first exposure to magic began when the Anderson family moved to Chicago. Anderson's father, who was a salesman, would occasionally lead him downstairs to the Ambassador East Hotel where the famous restaurant "The Pump Room" was. There, Anderson discovered wise guys playing card games, hustling and occasionally performing magic tricks. Young Anderson became highly intrigued by the art of conjuring and wanted to learn more about the subject. He eventually had the opportunity to see legendary magician Harry Blackstone, Sr. perform at a show. Anderson was fascinated by the performance and continued to digest all he could about magic. Anderson moved to Los Angeles and attended High School there. Every day after school, he would practice, fine tune and polish his conjuring skills. Anderson attended Buena Park High School before transferring to North Hollywood High School. Apparently he was valedictorian of his 1970 class of North Hollywood High School. He joined the Dante magic club where he rubbed elbows with close-up magic wizards Paul Harris and Paul Green. He also frequented the Magic Castle, where he befriended a lot of magicians, including magic legend Dai Vernon. At age 17, Anderson decided to move to San Francisco and worked the streets performing magic. He soon discovered that he could make more money in hustling the crowd. So he incorporated magic tricks and swindling into his routines.
Career
His copious appearances on Saturday Night Live led to his role as "Harry the Hat" on the first season of Cheers and eventually as Judge Harry Stone on the hit TV show Night Court. Anderson went on to appear in numerous other TV specials and shows, including 12 appearances on The Tonight Show Starring Johnny Carson. As a magician, Anderson has since toured extensively and performed many comedy/magic shows for clubs and broadcast, including Harry Anderson's Sideshow in 1987.
In 1990, he starred in the successful television adaptation of Stephen King's It as the adult Richie Tozier. The miniseries was directed by Tommy Lee Wallace. From 1993 to 1997, Anderson starred in the sitcom Dave's World, based loosely on the life and columns of humor columnist Dave Barry. Together with longtime friend Turk Pipkin, Anderson wrote a book called Games You Can't Lose: A Guide for Suckers, a collection of gags, cons, tricks and scams. First published in 1989 (ISBN 978-1-58080-086-0, 2001 reprint), this title also contains a survey of "Games You Can't Win" told from an insider's perspective. He appeared with Criss Angel in a TV special called The Science of Magic, later released on DVD.[2]
In November 2008, Anderson played himself on an episode of 30 Rock along with fellow Night Court cast members Markie Post and Charles Robinson.
Personal life
A longtime Mel Tormé fan, Anderson gave the eulogy at the singer's funeral. Judge Stone in Night Court was also a Tormé fan; the show's creator Reinhold Weege says the fact that Anderson was also a Tormé fan was completely coincidental.[3]
Anderson kept a nominally low profile after Dave's World was canceled. Tired of L.A.'s glaring spotlight, Anderson moved to New Orleans in 2002.[4] In the 1990s, he and his second wife Elizabeth opened a small shop in the French Quarter named "Sideshow"[5] selling various "magic, curiosities, and apocrypha." In the summer of 2005, Anderson also opened a nightclub in the French Quarter called "Oswald's Speakeasy", located at 1331 Decatur Street at the corner of Esplanade Avenue.[6] He performed a one-man show there called Wise Guy.[7]
In August 2006, Anderson and his wife announced their decision to leave New Orleans and move to Asheville, North Carolina, citing concerns including declining tourism to the city, the re-election of Mayor Ray Nagin, and the depressed mood prevailing in New Orleans.[8] Anderson appears in Hexing a Hurricane, a documentary about the first six months in New Orleans after Hurricane Katrina.[9] The Andersons sold Oswald's Speakeasy in October 2006. Anderson continues to present his evening show Wise Guy, which was originally developed for his theater in New Orleans.
[ [ { term: 'anderson', probability: 0.06 },
{ term: 'school', probability: 0.027 },
{ term: 'highly', probability: 0.027 } ],
[ { term: 'anderson', probability: 0.058 },
{ term: 'magic', probability: 0.042 },
{ term: 'show', probability: 0.033 },
{ term: 'performing', probability: 0.026 },
{ term: 'harry', probability: 0.021 } ] ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment