-
Notifications
You must be signed in to change notification settings - Fork 1
Vector tfidf #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Vector tfidf #31
Conversation
src/main.cpp
Outdated
| std::make_unique<scoring::BM25>(engine->getDocumentCount(), engine->getAvgDocumentLength()); | ||
| } else if (scoring_choice == "tf-idf") { | ||
| score_func = std::make_unique<scoring::TfIdf>(engine->getDocumentCount()); | ||
| if (algorithm_choice == "vector") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that should be `vector-tfidf´, right?
src/test.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to keep this test file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -0,0 +1,263 @@ | |||
| #include "vector_engine.hpp" | |||
| #include "./index/hnsw/hnsw_alg.hpp" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use absolute path if possible
| #include <sys/types.h> | ||
| #include <cstdint> | ||
| #include <string> | ||
| #include "../../fts_engine.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use absolute include path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #include <vector> | ||
|
|
||
| #include "../../documents/document_iterator.hpp" | ||
| #include "../../fts_engine.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use absolute include path
src/test.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a test file in the src folder? This does belong in the test folder doesn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMakeLists.txt
Outdated
| src/algorithms/vector/vector_engine_tfidf.hpp | ||
| src/algorithms/vector/vector_engine.hpp | ||
| src/algorithms/vector/index/vector_lib.hpp | ||
| src/algorithms/vector/index/hnsw/hnsw_alg.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .cpp file should not be part of FTS_HEADERS
| } | ||
|
|
||
| if (did % 10000 == 0) { | ||
| std::cout << did << "\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the benchmarking I think it'd make sense to remove all the prints from the build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Only if the index was loaded from disk, instead of being built again, a text is printed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting fails for this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ing with new DocumentIterator from main though
No description provided.