Start here

 

Ambiguity !!

“Well, Thanksgiving day is on Monday, Do you have any plans,” one of my friends asked me. Wait! We don’t have Thanksgiving day in Nepal. Moreover, if it means thanking people and god for well being and for the wonderful life we have. Then we do that every morning and evening in Nepal. In fact we have so much surplus time that we keep visiting temples to keep ourselves busy :D . Suddenly I remembered one of my Korean friend saying “Chuseok” is Korean thanksgiving day, but i didn’t pay that much attention that time. I always saw it as the two days for free food, no need to cook and clean dices’ :P . This time there was no free food :( . And here I go, I googled around and found out, “Thanksgiving Day is a harvest festival celebrated primarily in the United States and Canada. Traditionally, it is a time to give thanks for the harvest and express gratitude in general. While perhaps religious in origin, Thanksgiving is now primarily identified as a secular holiday. ” (okay I copied agree I copied this from Wikipedia). But interesting fact is that had so many different names and in fact thanksgiving day “Chuseok” in Korea, and “Pongal” in India were the festivals I celebrated when I was in those countries, but didn’t knew its same. Wow, here it’s the third time in different country where I will be celebrating thanksgiving day. While I was in India it had religious touch in that in celebrating Pongal. I remember rangolis in front of different classes and that special food they give on that day , rice cooked with milk and nuts and other species. In fact visiting each class and dorm entrance admiring the ramgolis was one of the usual afternoon activities. (Don’t have the misconception I am not an artist). They even used to show movies in that day. I remember students lining up for movies in the Hall. Everyone sweating but still eager on watching the movie. I used to be a Biology major student, and I even didn’t know we can watch movies in computer. Today all the movies are in my figure tips whatever I want to see, I am free to do. Fortunately I was the grad student in korea with the high-speed Internet in my Desktops. After free lunch and dinners I used to enjoy my movies while my friend Fahri busy with his shooting games :D . We were so obsessed with watching movies and playing games, anyone knew where to find us even in holidays (labs were our home, and we even had a bed there) . If I remember Fahri even had 500 GB of external disk full of movies and was plugged-in with the FTP.

“Part of Speech” of the word

I was looking for an approach to determine which part of the speech the word belongs.  With wordnet avaliable and lots of API to deal with that. I found it can be done with RiTa APi easily. Here is a simple peice of code

RiWordnet wordnet = new RiWordnet();
String[] pos = wordnet.getPos(“people”);
for(int i=0;i<pos.length;i++)
System.out.println(pos[i]);

It list all the POS related to “people” . In this case n and v.

RiTa will give you the following Strings indicating parts of speech:

n –> noun
v –> verb
a –> adjective
r –> adverb

If we want the best POS related to the word

String pos1 = wordnet.getBestPos(“people”);

Gives output n.

Splitting the CamelCase.

This afternoon I was looking for a way to split camelcase words. For example — for  getPrice,  i wanted something like get Price. Initially it looked easy with regular expression. But the problem took a little but time when I tested it across words like “getMyCountryISOCode” or something like “AStringWithTCPAndUDP”. So i tried something with regular expression and string tokenizer. I feel like there should be some other efficient way for this problem.It still doesnot work for something like “HeIsANASAAstronaut”. The correct output I wanted is something like _He_Is_A_NASA_Astronaut, but it gives _He_Is_ANASA_Astronaut.

Here is the code in java for this operation

import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class CamelCaseExtraction {

public static String unCamelize(String inputString) {
String retVal=”";
String c=”";
Pattern p = Pattern.compile(“\\p{Lu}”);
Matcher m = p.matcher(inputString);
StringBuffer sb = new StringBuffer();
while (m.find()) {
m.appendReplacement(sb, “_” + m.group());
}
m.appendTail(sb);
sb.toString().trim();
StringTokenizer st = new StringTokenizer(sb.toString(),”_”);
while(st.hasMoreElements())
{
String s=st.nextToken();
if(s.length()==1)
c=c+s;
else {
if(c.length()>=1){

retVal=retVal + “_” + c+”_”+s;
c=”";
}
else{
retVal=retVal + “_” + s;
}}
}
if(c.length()>=1)
retVal=retVal + “_” + c;
return retVal;
}

public static void main(String[] args) {
String s = “heIsANASAAstronaut”;
System.out.printf(“%s -> %s”, s, unCamelize(s));

}}

Service System of Social Network with CRM Application

My paper with Subaji and Eunmi Choi  finally got published in Information System journal. I think it provides some insight on how social networks can be helpful for enterprise.

Demands onenterprise applications are changing drastically in terms of service and value. Currently enterprises have started to view these applications as service systems, as they combine technology with organizational networks designed to deliver services that satisfy the needs of customers and marketing operations. Social networking is playing a crucial role in this direction and provides organizations with the critical data that enable to build strong relationships with their customers and partners. Enterprises have started using this concept, by integrating social networking services with their enterprise applications such as CRM. In this paper, we combine an open source social networking engine with a CRM (Customer Relationship Management) application to constitute a social CRM system. This can bring the customers closer to the enterprise and facilitate better communication with them. Social Networking Analysis constructs were used to analyze the effectiveness of service system. In the current competitive and economically challenging conditions, salespeople needsto quickly and effectively establish eaningful communication with customers. Our approach can address this issue, by handling the changing customer demands in minimal time,and increases service quality and business value.

Please find the paper attached. Comments are welcomed.Service System of Social Network with CRM Application

Reading : – PNUTS: Yahoo!’s Hosted Data Serving Platform

PNUTS is a massive scale, hosted database system focused on data serving for Yahoo’s web applications. The system is built with the set of architectural features and design decision that are important from Yahoo’s perspective which considers elastic scalability, flexible schemas, geographical distribution, high availability and relaxed consistency guarantees as it key  points . It uses asynchronous replication to ensure low write latency and provide geographic replication. The paper is well written and the authors compare PNUTS to Google Bigtable and Amazon Dynamo, among other things. It aims at a design point in between the strict and expensive-to-maintain serializability and the weakest eventual consistency models. It provides a weaker (than serializability), but still meaningful consistency model of record-level timeline consistency and thus provides useful guarantees to applications without sacrificing scalability. The details about how the underlying message broker works to ensure ordered atomic broadcast is missing.

Like:

  1. Low latency is achieved
  2. Weaker consistency: record-level timeline consistency model is applicable to many web applications
  3. System abstracts a number of steps from the programmer so programmers can more easily use distributed systems.
  4. Used by products of yahoo. It has been tested in real works.

Dislike:

  1. Reliance on guaranteed delivery pub/sub mechanism might be a disadvantage.
  2. It Storage of large databases is unclear, when mapping does not fit in memory.
  3. Use of a message broker may result in severe performance degradation in case of flash crowds.
  4. Index/view maintainer is required, as pointed out by the authors in future work.

Graduation Day @ Kookmin !!

Feb 24 was the graduation day in my previous university. Bad luck, I am here (@ Canada) and cannot participate. I wish all the best to all graduating students of kookmin university. Hope all your dreams come true. Somethings are not in your destiny. I did my undergrad from Nepal. After my undergrad I worked around 2-3 years in Nepal. It was then due to the political instability the grauation ceremony posponded indefinetely and was done when I was persuing my masters in seoul. That time too I was unable to participate. Hope someday I can wear that dress.

Follow

Get every new post delivered to your Inbox.