projects
/
SXSI
/
XMLTree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
158789d
)
Remove spurious printfs.
master
author
Kim Nguyễn
<kn@lri.fr>
Sat, 20 Oct 2012 05:27:32 +0000
(07:27 +0200)
committer
Kim Nguyễn
<kn@lri.fr>
Sat, 20 Oct 2012 05:27:32 +0000
(07:27 +0200)
xml-tree-builder.cpp
patch
|
blob
|
history
xml-tree.cpp
patch
|
blob
|
history
diff --git
a/xml-tree-builder.cpp
b/xml-tree-builder.cpp
index
f0c788f
..
cff28f8
100644
(file)
--- a/
xml-tree-builder.cpp
+++ b/
xml-tree-builder.cpp
@@
-86,7
+86,6
@@
xml_tree_builder::open_document(bool disable_text_index,
this->disable_text_index = disable_text_index;
if (!disable_text_index){
this->disable_text_index = disable_text_index;
if (!disable_text_index){
- fprintf(stderr, "Sample rate is %u\n", sample_rate);
tc_builder = TextCollectionBuilder::create(sample_rate, idx_type);
text_positions = new bit_vector();
text_index_type = idx_type;
tc_builder = TextCollectionBuilder::create(sample_rate, idx_type);
text_positions = new bit_vector();
text_index_type = idx_type;
diff --git
a/xml-tree.cpp
b/xml-tree.cpp
index
21c77c4
..
82f00b0
100644
(file)
--- a/
xml-tree.cpp
+++ b/
xml-tree.cpp
@@
-317,7
+317,7
@@
xml_tree* xml_tree::load(int fd, char* name, bool load_tc, int sf)
//tree->tags = static_sequence_bs::load(fp);
ufread(&tree->bits_per_tag, sizeof(uint), 1, fp);
//tree->tags = static_sequence_bs::load(fp);
ufread(&tree->bits_per_tag, sizeof(uint), 1, fp);
- fprintf(stderr, "\nBits per tag: %u\n", tree->bits_per_tag);
+
//
fprintf(stderr, "\nBits per tag: %u\n", tree->bits_per_tag);
ufread(&tree->tag_seq_len, sizeof(uint), 1, fp);
size_t size = uint_len(tree->bits_per_tag, tree->tag_seq_len);
tree->tag_seq = new uint[size];
ufread(&tree->tag_seq_len, sizeof(uint), 1, fp);
size_t size = uint_len(tree->bits_per_tag, tree->tag_seq_len);
tree->tag_seq = new uint[size];
@@
-387,7
+387,7
@@
std::pair<int32_t, int32_t> xml_tree::text_id_range(xml_tree::node_t x) const
else
i = text_positions->rank1(x-1);
j = text_positions->rank1(y);
else
i = text_positions->rank1(x-1);
j = text_positions->rank1(y);
-// fprintf(stderr, "Rank of node %i is %i, rank of closing %i is %i\n", x, i, y, j);
+
if (i == j)
return std::make_pair(xml_tree::NIL, xml_tree::NIL);
else
if (i == j)
return std::make_pair(xml_tree::NIL, xml_tree::NIL);
else
@@
-582,11
+582,11
@@
void xml_tree::print(xml_tree::node_t x, int fd, bool no_text)
label = tag(n);
} else
uputc('>', fd);
label = tag(n);
} else
uputc('>', fd);
- } else {
+
} else {
uputs("/>", fd);
n++;
label = tag(n);
uputs("/>", fd);
n++;
label = tag(n);
- };
+
};
};
} else do {
uputs("</", fd);
};
} else do {
uputs("</", fd);