Dear developers,--Firstly, thank you for the great package S-Space. I have used it to build the Latent Semantic Analysis model but when I am trying to use this model in answering a queryI got a problem in using DocumentVectorBuilder, which is:Based on the example provided in this page :if I have: String query=“hello world” and I want to create the vector for the query I can do:DocumentVectorBuilder builder = new DocumentVectorBuilder(mysspace); Vector documentVector = builder.buildVector(query);however, I got an error in the call of buildVector and it requires a vector to be passed, based on its specification
- buildVector(BufferedReader, DoubleVector) - Method in class edu.ucla.sspace.common.DocumentVectorBuilder
but I don’t know which vector to pass?Please explain ASAP as I’m using the package in my code.Many Thanks,
---
You received this message because you are subscribed to the Google Groups "S-Space Package Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to s-space-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
//iteration through all sentences in filteredQuerSen List to build its initial vector
for (int i=0; i< filteredQuerSen.size(); i++)
{
String currentSen=filteredQuerSen.get(i);
DoubleVector documentVectorr = new DenseVector(sspace.getVectorLength());
BufferedReader br = new BufferedReader(new StringReader(currentSen));
builder.buildVector(br, documentVectorr);
br.close();
}
Best Regards,