Friday, 3 July 2009

Using Perl to create graph and analyse it

Perl is a brilliant language! it is simple, very straight forward, you can get started in no time!

Only two days of quick rush through of some basics of Perl, I managed to find and use some module code from CPAN. I started to parse an XML, then use the data built a graph and ready to do some advanced graph calculation and analysis!

Today, I experimented on parsing a small portion of an XML file (5 papers with 10 authors), then successfully created a graph out of it. With the methods already provided by the Graph module, I can easily query the average path length of the graph and so on! It turned out my small graph has an average path length of 1.54!

I am really looking forward to try this on a bigger XML and do more interesting analysis.

No comments:

Post a Comment