Making bigram features from a particular dataset I have a folder which has a number of files which have a format like these 

madvise
write
write
write
write
read
read
madvise
ioctl
ioctl
getuid
epoll_pwait
read
recvfrom
sendto
getuid
epoll_pwait


that is it is a set of words which repeat.This is how all the files are like.
Now I have created a feature vector table using unigram that is each word becomes a feature and each file becomes a row where I put the frequency of that word occuring in the respective columns.

Now I want to create a similar FVT using bigrams.I was wondering how to do that in this case.
Bigram is better to be used with sentences. In your case, files contain a list of words, as I could understand. Therefore using bigrams in your project might not yield expecting results. However, if you are still willing to do that, this is how you calculate bigrams:

Take the list of words and count the frequencies of adjacent words. 
Ex:

(madvise, write) - 1

(write, write) -  3

(write, read) -  1

(read, read) -  1

(read, madvise) -  1

.

.

.

.

(sendto, epoll_pwait) -  1