<commit_before>#include "tensorflow_types.hpp"

// TODO: Capture error text rather than PyError_Print
// TODO: Capture ... (named and un-named args) and forward to call
// TODO: py_object_convert (convert from Python to R)
// TODO: consider R6 wrapper (would allow custom $ functions)

using namespace Rcpp;

// https://docs.python.org/2/c-api/object.html

// [[Rcpp::export]]
void py_initialize() {
  ::Py_Initialize();
}

// [[Rcpp::export]]
void py_finalize() {<commit_msg>more notes on object conversion<commit_after>#include "tensorflow_types.hpp"

// TODO: Capture error text rather than PyError_Print
// TODO: Capture ... (named and un-named args) and forward to call
// TODO: py_object_convert (convert from Python to R). could be as.character,
//   as.matrix, as.logical, etc. Could also be done automatically or via
//   some sort of dynamic type annotation mechanism
// TODO: consider R6 wrapper (would allow custom $ functions)

using namespace Rcpp;

// https://docs.python.org/2/c-api/object.html

// [[Rcpp::export]]
void py_initialize() {
  ::Py_Initialize();
}

// [[Rcpp::export]]
void py_finalize() {
{'fraction_non_alphanumeric': 0.13762287756925826, 'fraction_numerical': 0.0035746201966041107, 'mean_word_length': 4.045045045045045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1624247', 'n_tokens_mistral': 349, 'n_tokens_neox': 347, 'n_words': 114}