bitisony / jatetoolkit

Automatically exported from code.google.com/p/jatetoolkit
0 stars 0 forks source link

Class GlobalIndexWriterHSQL do not genrate the correct maps term2doc, doc2term and term2var #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. in Algorithm Tester activate the option to write persistent HSQL database
2. check the database script
3.

What is the expected output? What do you see instead?
term2doc table only has a document for each term
doc2term table only has a term for each document
term2var only has a var for each term

What version of the product are you using? On what operating system?
1.1 / ubuntu 12.04

Please provide any additional information below.

In the GlobalIndexWriterHSQL.persist class there is a "=" instead a "+=" in the 
inner for loops of the code blocks: 
  //persist term2DocMap,  //persist doc2TermMap and //persist termId2VarIds map

i.e.

for (Map.Entry<Integer, Set<Integer>> e : index.getTerm2Docs().entrySet()) {
                pstmt.setInt(1, e.getKey());
                String docIdStr = "";
                for(Integer i: e.getValue()){
                    //docIdStr=HSQLDBUtil.VALUE_SEPARATOR+i;
                    docIdStr+=HSQLDBUtil.VALUE_SEPARATOR+i;
                }

Original issue reported on code.google.com by David.Sc...@gmail.com on 29 Jan 2013 at 10:57

GoogleCodeExporter commented 9 years ago
Thanks for this. I have corrected this and updated in the SVN. Will 

Original comment by ziqizhan...@googlemail.com on 7 Mar 2013 at 11:40

GoogleCodeExporter commented 9 years ago

Original comment by ziqizhan...@googlemail.com on 25 Jul 2013 at 10:06