// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// cpp_chisq
double cpp_chisq(const IntegerVector& T1, const IntegerVector& T2, const IntegerVector& Tsum);
RcppExport SEXP _tall_cpp_chisq(SEXP T1SEXP, SEXP T2SEXP, SEXP TsumSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerVector& >::type T1(T1SEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type T2(T2SEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type Tsum(TsumSEXP);
    rcpp_result_gen = Rcpp::wrap(cpp_chisq(T1, T2, Tsum));
    return rcpp_result_gen;
END_RCPP
}
// cpp_split_tab
List cpp_split_tab(const IntegerMatrix& tab, const IntegerVector& indices);
RcppExport SEXP _tall_cpp_split_tab(SEXP tabSEXP, SEXP indicesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerMatrix& >::type tab(tabSEXP);
    Rcpp::traits::input_parameter< const IntegerVector& >::type indices(indicesSEXP);
    rcpp_result_gen = Rcpp::wrap(cpp_split_tab(tab, indices));
    return rcpp_result_gen;
END_RCPP
}
// cpp_switch_docs
NumericVector cpp_switch_docs(const IntegerMatrix& tab1, const IntegerMatrix& tab2);
RcppExport SEXP _tall_cpp_switch_docs(SEXP tab1SEXP, SEXP tab2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const IntegerMatrix& >::type tab1(tab1SEXP);
    Rcpp::traits::input_parameter< const IntegerMatrix& >::type tab2(tab2SEXP);
    rcpp_result_gen = Rcpp::wrap(cpp_switch_docs(tab1, tab2));
    return rcpp_result_gen;
END_RCPP
}
// extract_np_cpp
DataFrame extract_np_cpp(IntegerVector sent_id, IntegerVector token_id, IntegerVector head_token_id, CharacterVector dep_rel, CharacterVector upos, CharacterVector terms, int ngram_max, int max_gap);
RcppExport SEXP _tall_extract_np_cpp(SEXP sent_idSEXP, SEXP token_idSEXP, SEXP head_token_idSEXP, SEXP dep_relSEXP, SEXP uposSEXP, SEXP termsSEXP, SEXP ngram_maxSEXP, SEXP max_gapSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type sent_id(sent_idSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type token_id(token_idSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type head_token_id(head_token_idSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type dep_rel(dep_relSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type upos(uposSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type terms(termsSEXP);
    Rcpp::traits::input_parameter< int >::type ngram_max(ngram_maxSEXP);
    Rcpp::traits::input_parameter< int >::type max_gap(max_gapSEXP);
    rcpp_result_gen = Rcpp::wrap(extract_np_cpp(sent_id, token_id, head_token_id, dep_rel, upos, terms, ngram_max, max_gap));
    return rcpp_result_gen;
END_RCPP
}
// extract_svo_cpp
DataFrame extract_svo_cpp(IntegerVector sent_id, IntegerVector token_id, IntegerVector head_token_id, CharacterVector dep_rel, CharacterVector upos, CharacterVector terms);
RcppExport SEXP _tall_extract_svo_cpp(SEXP sent_idSEXP, SEXP token_idSEXP, SEXP head_token_idSEXP, SEXP dep_relSEXP, SEXP uposSEXP, SEXP termsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< IntegerVector >::type sent_id(sent_idSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type token_id(token_idSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type head_token_id(head_token_idSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type dep_rel(dep_relSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type upos(uposSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type terms(termsSEXP);
    rcpp_result_gen = Rcpp::wrap(extract_svo_cpp(sent_id, token_id, head_token_id, dep_rel, upos, terms));
    return rcpp_result_gen;
END_RCPP
}
// calc_reciprocal_sum_cpp
NumericVector calc_reciprocal_sum_cpp(List ngram_words, CharacterVector word_freq_names, NumericVector word_freq_values);
RcppExport SEXP _tall_calc_reciprocal_sum_cpp(SEXP ngram_wordsSEXP, SEXP word_freq_namesSEXP, SEXP word_freq_valuesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type ngram_words(ngram_wordsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type word_freq_names(word_freq_namesSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type word_freq_values(word_freq_valuesSEXP);
    rcpp_result_gen = Rcpp::wrap(calc_reciprocal_sum_cpp(ngram_words, word_freq_names, word_freq_values));
    return rcpp_result_gen;
END_RCPP
}
// count_lexical_cpp
IntegerVector count_lexical_cpp(List ngram_pos, CharacterVector lexical_pos);
RcppExport SEXP _tall_count_lexical_cpp(SEXP ngram_posSEXP, SEXP lexical_posSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type ngram_pos(ngram_posSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type lexical_pos(lexical_posSEXP);
    rcpp_result_gen = Rcpp::wrap(count_lexical_cpp(ngram_pos, lexical_pos));
    return rcpp_result_gen;
END_RCPP
}
// generate_ngrams_cpp
List generate_ngrams_cpp(List sentences_terms, List sentences_pos, int max_ngram, CharacterVector lexical_pos);
RcppExport SEXP _tall_generate_ngrams_cpp(SEXP sentences_termsSEXP, SEXP sentences_posSEXP, SEXP max_ngramSEXP, SEXP lexical_posSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type sentences_terms(sentences_termsSEXP);
    Rcpp::traits::input_parameter< List >::type sentences_pos(sentences_posSEXP);
    Rcpp::traits::input_parameter< int >::type max_ngram(max_ngramSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type lexical_pos(lexical_posSEXP);
    rcpp_result_gen = Rcpp::wrap(generate_ngrams_cpp(sentences_terms, sentences_pos, max_ngram, lexical_pos));
    return rcpp_result_gen;
END_RCPP
}
// syntactic_complexity_cpp
DataFrame syntactic_complexity_cpp(CharacterVector doc_id, IntegerVector sent_id, IntegerVector token_id, IntegerVector head_token_id, CharacterVector dep_rel, CharacterVector upos);
RcppExport SEXP _tall_syntactic_complexity_cpp(SEXP doc_idSEXP, SEXP sent_idSEXP, SEXP token_idSEXP, SEXP head_token_idSEXP, SEXP dep_relSEXP, SEXP uposSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< CharacterVector >::type doc_id(doc_idSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type sent_id(sent_idSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type token_id(token_idSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type head_token_id(head_token_idSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type dep_rel(dep_relSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type upos(uposSEXP);
    rcpp_result_gen = Rcpp::wrap(syntactic_complexity_cpp(doc_id, sent_id, token_id, head_token_id, dep_rel, upos));
    return rcpp_result_gen;
END_RCPP
}
// txt_recode_cpp
CharacterVector txt_recode_cpp(CharacterVector x, CharacterVector from, CharacterVector to, bool na_rm);
RcppExport SEXP _tall_txt_recode_cpp(SEXP xSEXP, SEXP fromSEXP, SEXP toSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< CharacterVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type from(fromSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type to(toSEXP);
    Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
    rcpp_result_gen = Rcpp::wrap(txt_recode_cpp(x, from, to, na_rm));
    return rcpp_result_gen;
END_RCPP
}
// txt_recode_ngram_cpp
CharacterVector txt_recode_ngram_cpp(CharacterVector x, CharacterVector compound, IntegerVector ngram, std::string sep);
RcppExport SEXP _tall_txt_recode_ngram_cpp(SEXP xSEXP, SEXP compoundSEXP, SEXP ngramSEXP, SEXP sepSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< CharacterVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type compound(compoundSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type ngram(ngramSEXP);
    Rcpp::traits::input_parameter< std::string >::type sep(sepSEXP);
    rcpp_result_gen = Rcpp::wrap(txt_recode_ngram_cpp(x, compound, ngram, sep));
    return rcpp_result_gen;
END_RCPP
}
// txt_recode_batch_cpp
List txt_recode_batch_cpp(List x, CharacterVector from, CharacterVector to, bool na_rm);
RcppExport SEXP _tall_txt_recode_batch_cpp(SEXP xSEXP, SEXP fromSEXP, SEXP toSEXP, SEXP na_rmSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type x(xSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type from(fromSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type to(toSEXP);
    Rcpp::traits::input_parameter< bool >::type na_rm(na_rmSEXP);
    rcpp_result_gen = Rcpp::wrap(txt_recode_batch_cpp(x, from, to, na_rm));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_tall_cpp_chisq", (DL_FUNC) &_tall_cpp_chisq, 3},
    {"_tall_cpp_split_tab", (DL_FUNC) &_tall_cpp_split_tab, 2},
    {"_tall_cpp_switch_docs", (DL_FUNC) &_tall_cpp_switch_docs, 2},
    {"_tall_extract_np_cpp", (DL_FUNC) &_tall_extract_np_cpp, 8},
    {"_tall_extract_svo_cpp", (DL_FUNC) &_tall_extract_svo_cpp, 6},
    {"_tall_calc_reciprocal_sum_cpp", (DL_FUNC) &_tall_calc_reciprocal_sum_cpp, 3},
    {"_tall_count_lexical_cpp", (DL_FUNC) &_tall_count_lexical_cpp, 2},
    {"_tall_generate_ngrams_cpp", (DL_FUNC) &_tall_generate_ngrams_cpp, 4},
    {"_tall_syntactic_complexity_cpp", (DL_FUNC) &_tall_syntactic_complexity_cpp, 6},
    {"_tall_txt_recode_cpp", (DL_FUNC) &_tall_txt_recode_cpp, 4},
    {"_tall_txt_recode_ngram_cpp", (DL_FUNC) &_tall_txt_recode_ngram_cpp, 4},
    {"_tall_txt_recode_batch_cpp", (DL_FUNC) &_tall_txt_recode_batch_cpp, 4},
    {NULL, NULL, 0}
};

RcppExport void R_init_tall(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
