Wednesday, December 24, 2014

Day 15: What a workout!

Today started off very pleasantly for me. I opened my program after a long time and was faced with Greek and Latin as the old saying goes.

I had lunch at 11 30 itself which seems to be a nice idea. I coded solidly till around seven thirty. Idiotic mistakes I made

1. Precedence of logical operators
2. The fact that strings are immutable - copy.replace does nothing to copy unless I put copy = copy.replace

Anyway, I managed to capture events from my word problem and solve it. It's going good.

Tuesday, December 23, 2014

Day 14: Talk after talk after talk

Somewhere in an academic mentality, the urge to absorb information and the fact that you may miss out something urges me to attend a talk every time I am in lab. And no matter how amazing it was, I will always feel, oh my God it's evening and I haven't done anything :P

Apart from that, yesterday somebody asked me a few doubts and I had this sinking feeling - why do you ask me when I myself am so self-doubting. But as the conversation progressed, I felt more and more confident. Then, he asked me about MIT's Smart system and I felt like, oh I don't know what it is and googled it.

Only to find that I have already visited the page and I realized I had read it so fast and it had completely evaporated from my system. This is coming from a person who remembers what was the colour of her chair in kindergarten :P

Which reminded me to get back to blogging, I'm getting old for God's Sake!


Sunday, December 7, 2014

Day 13: How to stop a thread in Java

This is my ultimate guide to killing a thread.

a) Interrupt it
b) In its definition, catch the InterruptedException and interrupt it again :P

Demos are highly confusing.

Thursday, November 27, 2014

Day 12: Some things are not as simple as they seem

Humans are brilliant!

I cannot express how I have felt this the past week trying to make the computer work. As I get pushed to the edge of frustration yet again trying to reproduce past research, I'm again stuck in coding and well past my saturation state for today.

On another note, one student reported a bug in the code we uploaded. It was so trivial yet it caused a lot of problems. Sigh.

Universal research scholar feeling : Implementing a paper is like uncovering hidden connections that were skimmed over by the author due to word limit :P

Friday, November 21, 2014

Day 11 : More Problems?

Today I realized I had skipped an entire section of base paper that didn't provide any explanation but was able to perform an interesting parsing. It divided complex statements and removed pronouns. I tried to recreate the same. It was easy to remove pronouns using co-reference resolution. To break into constiuent sentences, I found the corresponding verb and the fragment before and after using Stanford CoreNLP parser.

[Bakman 2007]

Input

Ruth had 3 apples. She put 2 apples into a basket. How many apples are there in the basket now, if in the beginning there were 4 apples in the basket?

Output in paper

1) Ruth had 3 apples.
2) Ruth put 2 apples into the basket.
3) There are ? apples in the basket now.
4) There were 4 apples in the basket.

My output:

1) Ruth had 3 apples.
2) Ruth put 2 apples into the basket.
3)  ? apples are there
4) There were 4 apples in the basket.

The pronoun she is resolved. However, I am not getting how many apples are there "in the basket". Need to work on that.

Thursday, November 20, 2014

Day 10: Coding and Still Coding

First of all, the double doors to my lab is becoming very annoying. Opening consecutive self-closing doors is kind of bugging.

Today, I brought my implementation of [Bakman2007] to an intermediate milestone. I feel that triggering a schema based on a change verb alone is not enough. I plan to use dependency and co-reference parsing a bit more.

Then, in the algorithms interface, I added the option of allowing the user to choose colours. Today must be the longest time I sat in lab continuously coding and I guess I will be for some time longer. I'm finally seeing some structure emerge in the programs I am trying. Making the tiny things matter and feeling positive.

Wednesday, November 19, 2014

Day 9 : Procrastination

I have not at all been regular with this blog. Yes, I've some great excuses but I am not going to waste your time on them.

So to round things up, I finally feel am going somewhere. I found a paper that could be a base paper and started implementing it.

I had a very funny meeting where I was so certain I would be reprimanded but instead ended up presenting the next day. I got so enthusiastic that I went and presented with a proper digital presentation. Unnecessarily. And experienced the chagrin of feeling like I wasted time.

The first demo implementing our application was out and we felt so happy seeing it perform DFID and IDA*. And I made a fool of myself saying, oh it found a shorter path! DFID always finds the shortest path, IDA* finds the least cost path. Making such fundamental mistakes gave me a #facepalm moment.

I've started reading about schemas for understanding natural language. As per my understanding, they are templates that can be triggered to perform some actions.

Wednesday, November 12, 2014

Day 8: To go or not to go?

Research is the highest pinnacle of academic freedom. You study what you want, when you want and how you want. There are no compulsions, no rules, just an appreciation of results.

In such a scenario, many a times the effort of going to the lab may seem quite mammoth :P

Ever since I installed remote login, I've been visiting the lab very less. Mental note to take some initiative.

Anyway.

I tried to see if patterns emerge from dependency parsing and co-reference resolution but was drawing a blank everywhere.

Today, I stumbled upon a review paper. A review paper is my Godsend. No matter how much you read, you always have this feeling someone has solved this problem somewhere. A review paper [Garain,Mukherjee 2008] is a summary of all related works in a particular field with a discussion of pros and cons of a system. It was a very good exercise to see what was happening. And more importantly, how much more there is to go.

In essence there are three approaches in trying to solve a word problem - have a database of example word problems, work with a subset of English or match templates or schemas. What was saddening was the intensive domain knowledge coding required for the simplest of problems. Common Sense is the most complex form of knowledge that we humans take absolutely for granted.

In the words of Captain Claw, "There has to be a way out!".

Tuesday, November 11, 2014

Day 7 : Learning?

Today, I studied about simple typed-lambda calculus and Combinatory Categorial Grammar. This was from a tutorial. There were two reasons I spent time on it - one was that the author of the base paper I was reading presented it and one was that it was under the heading of "Semantic Parsing" which gave me a feel that meaning of text can be retrieved.

Semantic Parsing aims to retrieve as much meaning required for a task. The calculus is a higher order logic from first logic, that can communicate with CCG. CCG is mildly context sensitive that is able to match syntax and semantics.

Still, it requires learning to resolve ambiguity. In a way, the modelling of semantics is still difficult. And I felt it was not relevant to what I was trying to achieve.

I feel this learning exercise was of some use even if not immediately applicable.

Wednesday, November 5, 2014

Day 6: Rebirth

So I enter the lab after so many days only to see I've missed an important meeting, a talk and basically every schedule possible. At this point in time, I'm happy I am not in corporate life because I think they would've just chucked me out if I fall sick so often :P

I tried to fix everything and do twice as much today and predictably trip and fall everywhere. Finally, I start applying my brain little by little. I learnt a bit about different grammars and tools - dependency, co-reference resolution and am going to look into CCG. Then, I added a new functionality in the algorithm visualization code. As the assignments gain more structure, we realized we need to give a framework for them to ask questions from the user and display a few messages. So, we incorporated those features. We finalized on the marking scheme and will hopefully finish a major chunk of TA work tomorrow.

So it's a brand new day, let's see what the future holds.

Friday, October 31, 2014

Day 5: Invigilation

Today was a very sleepy day. I had a small bug to correct, that is standardize the variable names. Then, in algorithm visualisation code, removed necessity of try-catch for every display function.

All too soon it was lunch time followed by invigilation for quiz. It's so tempting to just tell the answer ;) I was totally unable to show some semblance of authority today. Still have fever, need to recoup this weekend.  I have to see the questions and need to finish correction by Wednesday.

Thursday, October 30, 2014

Day 4 : Swings

The title refers to
a) The Java Swing program I'm writing
b) The enormous mood swing that just struck me

Today I was awed by Mr. Stephen Wolfram.Yesterday, I had used the WolframAlpha API. Curious about its development, I read the founder's story. He got his PhD by the time he was 20. He bunked college lectures he found boring and published a paper by the time he was 18. And I felt like, what the hell am I doing with my life. I know hard work, questioning, understanding and creativity. But somewhere I don't know how to combine these things together. If there is one thing that motivated me, it was the never give up attitude. Like the bird's eye and Arjuna from Mahabharat, there was just one goal and nothing else. Stubbornness.

Anyway, most of the morning went in preparation for the afternoon meeting. My friend was presenting her ideas and critiquing such things often sharpen my wits I feel. Later on the programming front, I used the API to convert number names to numerical integers. I had a quirky error due to the fact some equations do not need simplification and I did not check that. Just before the meeting however, I felt highly feverish.

After the meeting, I was totally sick and I didn't even realize it and was in a general bad mood. Continually thinking something isn't exactly healthy. So I took off today early and said hasta la vista.

Oh yes, yesterday I learnt about the normalized Google distance for semantic similarity. It overcomes the shortcomings of WordNet for single words and establishes semantic similarity between phrases like "Artificial Intelligence" and "Machine Learning" using search results; a result that would have hitherto been weird with the four separate words. Again, friends in labs give such interesting facts :)Also started parsing NCERT textbooks for tougher problems that provide more use cases.

Tomorrow, am planning to test the equation solver on the baseline corpora. It should be pretty straightforward as the baseline equations were already simple and they also used EJML for solving. Logically, it should solve them properly with no hitches whatsoever.


 

Wednesday, October 29, 2014

Day 3: The Art of Debugging

There are some days you feel you are not going to do anything with zero plan and just blank entry to lab. And you end up doing something substantial!

Today morning, I was asked to diagnose a few errors for our assignment. We have a pretty cool game assignment where all groups pitch their game bots on our server. The script was in Python. Eventually, the error turned out to be that the MySQL server was not running. Apparently the relevant error in Python is displayed at the last line in contrast to the first line of Java. Feeling pretty smug about debugging, I had quite a happy start to the day.

Back on my system, I started working on simplifying linear equations to some canonical form. After collecting like terms together, I was able to work with + and -. In that process, I wanted a HashMap in a sorted fashion. I learnt that TreeMap is an elegant solution for that.

However, when it came to complex equations, it became pretty confusing. Then, I stumbled upon this pure gold mine - WolframAlpha. Eagerly, I started using its API. It was pretty non-intuitive to use in the beginning and googling an example for it wasn't helping. Finally, I came upon the GitHub account of the writer of this code and got a sample code. It did not work still. Then, I saw there were some packages to be included. After, all that I got the API running.

Only to see the sample program in my downloaded folder :P

I could still not use the output as it was not in the canonical form. After a bit of cleaning the string in the most childish high school fashion, I passed it to the old program I had developed for +/-. I was happy it was of some use. And then voila!, I got the required result.

Throughout, I made the most ludicrous mistakes which cost me a lot of time. And now I learnt that "costed" is not the past tense of cost. I am very surprised. Anyway, today depended completely on debugging and had a fulfilling day.

Tomorrow, I should see what other potentials I can tap from WolframAlpha.

Tuesday, October 28, 2014

Day 2 : TA work

One of the joys of being a graduate student is the opportunity to be a Teaching Assistant. Me and my friend are developing a code for graphic visualization of algorithms on random graphs. The algorithms would be supplied by the students as part of their course work.

It was with tears of joy when we saw our code run on the big TV monitor with our implementations of basic BFS and DFS algorithms. We wrote the documentation along with the guidelines for students to use the code. Hopefully, they will find it easy to modify and the project will be a big success.

I've started using Stanford CoreNLP for my research. I have to say, it's one of the finest examples of machine learning and its success.

Monday, October 27, 2014

Day 1 : The Weekly Meeting

Post Diwali, I had a meeting scheduled to describe a paper on white board to my guide. Being the true blue Diwali enthusiast (aka taking 1024 photos in different lights), I had not reached the required level of understanding. My sir was kind enough to reschedule it to Monday and I went all prepared with derivations and everything I understood. And yet, inevitably, no matter how much I scrutinize something, there is always one obvious detail that I miss that makes me feel pretty stupid.

Relatively, it went well.

Then I helped my friend with few ideas in lab. And then I realized a golden nugget of wisdom.

"It's always easier to think about others' problems than yours" :P

Anyway, I finally created a GitHub account and now am addicted to it! I wrote a program to solve linear equations in Java using EJML.