diff options
author | scratko <m@scratko.xyz> | 2025-08-03 02:28:24 +0300 |
---|---|---|
committer | scratko <m@scratko.xyz> | 2025-08-03 02:56:54 +0300 |
commit | ef8a3f6c3e20178ee520f1e6bedbc866e3c9b490 (patch) | |
tree | cbdea78c5c54e5dda4a8eb9c8a0d42091a27448c /utilities.h | |
download | artifical-text-detection-ef8a3f6c3e20178ee520f1e6bedbc866e3c9b490.tar.gz artifical-text-detection-ef8a3f6c3e20178ee520f1e6bedbc866e3c9b490.tar.bz2 artifical-text-detection-ef8a3f6c3e20178ee520f1e6bedbc866e3c9b490.zip |
Diffstat (limited to 'utilities.h')
-rwxr-xr-x | utilities.h | 39 |
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);
|