back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/utilities.h
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2025-08-03 02:28:24 +0300
committerscratko <m@scratko.xyz>2025-08-12 03:37:52 +0300
commit07b3368ea184b2bd37a4cee2ab869c4fd3673f45 (patch)
tree8be8642cb29d94d6217c3807172e3f3347d4b991 /utilities.h
downloadartifical-text-detection-07b3368ea184b2bd37a4cee2ab869c4fd3673f45.tar.gz
artifical-text-detection-07b3368ea184b2bd37a4cee2ab869c4fd3673f45.tar.bz2
artifical-text-detection-07b3368ea184b2bd37a4cee2ab869c4fd3673f45.zip
Initial commit: added source code, resources and READMEHEADmaster
Diffstat (limited to 'utilities.h')
-rwxr-xr-xutilities.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/utilities.h b/utilities.h
new file mode 100755
index 0000000..ca0240b
--- /dev/null
+++ b/utilities.h
@@ -0,0 +1,39 @@
+#ifndef UTILITIES_H
+#define UTILITIES_H
+
+#endif // UTILITIES_H
+
+#include <string>
+#include <vector>
+#include <algorithm>
+#include <map>
+#include <cctype>
+#include <set>
+#include <map>
+#include <iostream>
+#include <fstream>
+#include <cmath>
+#define BOOST_LOCALE_HIDE_AUTO_PTR
+#define BOOST_BIND_NO_PLACEHOLDERS
+#pragma push_macro("slots")
+#undef slots
+#include <boost/python/numpy.hpp>
+#include <boost/python.hpp>
+#pragma pop_macro("slots")
+
+void n_gram_calc(const std::string& doc, int n);
+
+std::vector<int> freq_in_chunk(const std::string& chunk,
+ const std::vector<std::string>& dictonary);
+
+long double dzv_calc(int T, const std::vector<int> di,
+ const std::vector <int> dj, int i, int j,
+ const std::vector<std::vector<int>> freq_of_robot_ngramm_i,
+ const std::vector<std::vector<int>> freq_of_robot_ngramm_j);
+
+long double zv_calc(int T, const std::vector<int> di, int i,
+ const std::vector<std::vector<int>> freq_of_robot_ngramm_i_j);
+
+long double spearman_calc(const std::vector<int> di, const std::vector<int> freq_of_robot_ngramm_k);
+
+void prepare(std::string& st);