Multi Dimensional Arrays

2006-01-31 Thread amit hetawal
  Hello all,   I am a newbee in perl. Just wanted some guidance so as to how to implement multidimensional arrays in perl. I have to create an 2-d array with 26*26 of all the english alphabets so that for each row and column i can have a partiulcar value like a to a =1 b to a=2; I am just not gett

matrix writing in a file

2006-02-07 Thread amit hetawal
  ? Hello all,   I am writing a matrix to a file as : open(WRITE, ">training.txt"); for ($x = 1; $x<27; ++$x) {   for($y=1; $y<27;++$y)   {   print WRITE "$matrix[$x][$y] ";     }   print WRITE "\n"; } this code is working fine and writing the file in format as ; 0 0 0 0 0 0 0 1 1 1 2 3

Tri-grams?

2006-02-21 Thread amit hetawal
  Hello All,   I needed some logic behind the code for text analysis. its like i have to calculate the frequency of the each of the tri-grams present in a given piece of text i.e i need a way to get the number of occurence of 't' follwoed by 'he' for the word 'the' in whole of the text. for text

Re: Re: Tri-grams?

2006-02-22 Thread amit hetawal
  On Wed, 22 Feb 2006 $Bill Luebkert wrote : >amit hetawal wrote: > > > > > Hello All, > >  I needed some logic behind the code for text analysis. its like i have > > to calculate the frequency of the each of the tri-grams present in a > > given piece of