add get_version function
Change-Id: I7f294d3a0ce1acb961c49a8a9bee0f3e8e2824eb
diff --git a/src/collocatordb.cc b/src/collocatordb.cc
index 28035f6..691f820 100644
--- a/src/collocatordb.cc
+++ b/src/collocatordb.cc
@@ -18,6 +18,7 @@
#include <rocksdb/slice_transform.h>
#include "merge_operators.h"
#include "export.h"
+#include "config.h"
#define WINDOW_SIZE 5
#define FREQUENCY_THRESHOLD 5
@@ -895,6 +896,10 @@
return strdup(db->collocators2json(w1, db->get_collocation_scores(w1, w2)).c_str());
}
+ DLL_EXPORT const char *get_version() {
+ return PROJECT_VERSION;
+ }
+
#ifdef __clang__
#pragma clang diagnostic push
#endif