<commit_before>cdef extern from "<string>" namespace "std":

    size_t npos = -1

    cdef cppclass string:
        string()
        string(char *)
        string(char *, size_t)
        string(string&)
        # as a string formed by a repetition of character c, n times.
        string(size_t, char)

        char* c_str() nogil
        size_t size() nogil<commit_msg>std::string.c_str() actually returns a 'const char*', add declaration of std::string.data() method<commit_after>from libc.string cimport const_char

cdef extern from "<string>" namespace "std":

    size_t npos = -1

    cdef cppclass string:
        string()
        string(char *)
        string(char *, size_t)
        string(string&)
        # as a string formed by a repetition of character c, n times.
        string(size_t, char)

        const_char* c_str() nogil
        const_char* data() nogil
        size_t size() nogil
{'fraction_non_alphanumeric': 0.09966777408637874, 'fraction_numerical': 0.0022148394241417496, 'mean_word_length': 2.4242424242424243, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '6866486', 'n_tokens_mistral': 280, 'n_tokens_neox': 270, 'n_words': 90}