Skip to main content

Posts

Showing posts from June, 2014

ThreeJs - 3D data visualization on web

     I was into 3D since high school years. My first experience was making 3D models with 3Dsmax. Since few years back Google Chrome had been trying to bring this technology to all desktops through web. With the rise of HTML5 it became possible to render 3D on client side by using WebGL via javascript. However, using WebGL via Javascript was not easy so open-source communities developed various wrapper libraries to simplify using webGL.    Among them ThreeJS ( http://threejs.org/ ) is one the best choice to use IMHO. It is more mature comparing to others, and there are many examples to follow. It is better to see rather than reading, Check out this ThreeJS example:  http://www.georgeandjonathan.com/#6 Is not it amazing? Dynamic, interactive and open-source 3D visualization directly on your Chrome Browser. It runs on the latest Android Tablets and Phones too. In few years, I think everyone will be able to browse 3D sites on their devices. So, by using this library I am tryi

Korean NLP on Hive

These days I am building a small platform for doing "Topic Modeling" with Apache Mahout. While working on this project I tried to maximize the speed of NLP processing as fast as possible. Previously, I was running NLP on a single node after retrieving the tweet messages from Hive. Then I found out about UDF(User Defined Functions) which makes it possible to run custom libraries on Hadoop nodes during the mapping process of MapReduce. By using UDF, I  attached open-source Korean NLP library Hannanum and made a library to process NLP and Text processing parallel. Here is how the hive query looks like: >select extractNoun(text) from twitter; I put the source code on GitHub Feel free to use and ask questions. Here is my K-Means dumped cluster output (processing k=100 topics with one-day tweet data) Output.txt

Hive: Creating External Table from existing one

   Apache Hive is an excellent tool to retrieve data from HDFS  using SQL queries. I used Json Serde library to map Json files into Hive table. So initially I created table like this: CREATE EXTERNAL TABLE twitter ( coordinates struct , type:string, created_at string, entities struct , text:string, urls:array , url:string, user_mentions:array , name:string, screen_name:string, favorite_count int, favorited boolean, filter_level string, geo struct , type:string, id_str string, in_reply_to_screen_name string, in_reply_to_status_id_str string, in_reply_to_user_id_str string, lang string, retweet_count int, retweeted boolean, retweeted_status struct , text:string, urls:array , url:string;, user_mentions:array , name:string, screen_name:string, favorite_count:int, favorited:boolean, geo:struct , type:string, id_str:string, in_reply_to_screen_name:string, in_reply_to_status_id_str:string, in_reply_to_user_id_str:string, lang:string, retweet_count:int, retwe