Friday, June 29, 2012

Google Ngrams Part 1

So I have been spending some time analyzing language usage from a bunch of different areas including: chats, twitter, email, phone conversations and books. I have been starting to analyze the raw data from Google ngrams and the raw data sucks ass. Come on Google you can't write a 5 minute piece of perl code to parse the grams. Don't believe me look here:
As you can tell there has been a drop in the usage of vi for editing books, as it probably moved on to be a programmer's tool around the 1830s. This is not even to mention the words with non alpha numeric characters. I guess I will parse my happy heart out. Just removing words that contain numbers or non-alpha characters besides (') has me at about 1/3 of the original size for 1grams. I also removed words with less than 5 occurrences in less than 2 books. I.e. each word has to occur at least 5 times in at least 2 books. I'll post the scripts when I am done.

Friday, June 1, 2012

LCD Clock MSP430 Nokia 5110

So I finally managed to program a somewhat real-time clock using the MSP4302012 target boards ( It took me a while because all of the code I tried to use did not work haha. I ended up kludging together some prewritten code and then writing some of my own ( The code was written in Code Composer Studios and will not work with mspgcc.

The connections I used are as follows:
Nokia   :   MSP430
1 VCC :    P1 VCC
2 GND :   P13 GND
3 SCE  :   P2
4 RST :  P3
5 D/C : P4
6 DNK(MOSI) : P5
7 SCLK : P6
8 LCD : P7

One should just be able to import this code into Code Composer and if using the same pin connections It should work immediately. You can run it off the ez430 USB stick or 3V. I used two coin cells in parallel. Feel free to comment if you have any questions.