I have two csv files with characters running up to 50000 variables in a first column of these two files. I have to calculate cosine similarity between these columns of two files. I have tried to use LSA in R. But some problem with my result. Can any one help me? Below is my coding for the same.
library(lsa)
Gyan=tempfile()
dir.create(Gyan)
single_tags=read.csv(file.choose(), sep = ',')
as.character(single_tags$CULTAGS)
options(max.print = 1000000)
write(as.character(single_tags$CULTAGS),file = paste(Gyan, 'D1',sep = '1'))
Single_ASFA=read.csv(file.choose(),sep = ',')
options(max.print = 1000000)
as.character(Single_ASFA$ASFACV)
write(as.character(Single_ASFA$ASFCV),file = paste(Gyan, '/'))
Mycomparison = textmatrix(Gyan, minWordLength = 1)
Mycomparison
res = lsa::cosine(myMatrix[,1],myMatrix[,2])
res