Skip to content

Commit

Permalink
Changed the ambiguous naming of nofNonLiterals to nofNonLiteralsInTex…
Browse files Browse the repository at this point in the history
…tIndex everywhere aswell as num-non-literals to nom-non-literals-text-index
  • Loading branch information
Flixtastic committed Dec 13, 2024
1 parent e93f944 commit deb1e37
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/index/IndexImpl.Text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,9 @@ void IndexImpl::processWordsForInvertedLists(const string& contextFile,
textMeta_.setNofTextRecords(nofContexts);
textMeta_.setNofWordPostings(nofWordPostings);
textMeta_.setNofEntityPostings(nofEntityPostings);
nofNonLiterals_ = nofContexts - nofLiterals;
configurationJson_["num-non-literals"] = nofNonLiterals_;
nofNonLiteralsInTextIndex_ = nofContexts - nofLiterals;
configurationJson_["num-non-literals-text-index"] =
nofNonLiteralsInTextIndex_;
writeConfiguration();

writer.finish();
Expand Down
2 changes: 1 addition & 1 deletion src/index/IndexImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ void IndexImpl::readConfiguration() {
loadDataMember("num-subjects", numSubjects_, NumNormalAndInternal{});
loadDataMember("num-objects", numObjects_, NumNormalAndInternal{});
loadDataMember("num-triples", numTriples_, NumNormalAndInternal{});
loadDataMember("num-non-literals", nofNonLiterals_, 0);
loadDataMember("num-non-literals-text-index", nofNonLiteralsInTextIndex_, 0);

// Initialize BlankNodeManager
uint64_t numBlankNodesTotal;
Expand Down
6 changes: 4 additions & 2 deletions src/index/IndexImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class IndexImpl {
// Keeps track of the number of nonLiteral contexts in the index this is used
// in the test retrieval of the texts. This only works reliably if the
// wordsFile.tsv starts with contextId 1 and is continuous.
size_t nofNonLiterals_;
size_t nofNonLiteralsInTextIndex_;

// Global static pointers to the currently active index and comparator.
// Those are used to compare LocalVocab entries with each other as well as
Expand Down Expand Up @@ -429,7 +429,9 @@ class IndexImpl {
size_t getNofEntityPostings() const {
return textMeta_.getNofEntityPostings();
}
size_t getNofNonLiteralsInTextIndex() const { return nofNonLiterals_; }
size_t getNofNonLiteralsInTextIndex() const {
return nofNonLiteralsInTextIndex_;
}

bool hasAllPermutations() const { return SPO().isLoaded(); }

Expand Down

0 comments on commit deb1e37

Please sign in to comment.