<commit_before>from crdfio cimport *
from cython cimport *
from cpython cimport *
from libc.stdio cimport *
from libc.stdlib cimport *
import os
import sys
from raptorutil import *

__author__ = '<NAME>'
__email__ = '<EMAIL>; <EMAIL>'

#-----------------------------------------------------------------------------------------------------------------------
# default (straight covertion)
#-----------------------------------------------------------------------------------------------------------------------
cdef inline void serialize_handler(void *user_data, raptor_statement* statement):
    raptor_serializer_serialize_statement(<raptor_serializer*>user_data, statement)

cpdef convert(char* srcfname, char* dstformat, char* baseuri=NULL):
    srcformat = get_parser_type(srcfname)
    dstfname  = '%s.%s'%(os.path.splitext(srcfname)[0], get_rdfext(dstformat))
    print 'converting [%s] (%s) ====> [%s] (%s)'%(srcfname, srcformat, dstfname, dstformat)

    # LOCAL VARS
    cdef raptor_world *world                = NULL
    cdef raptor_parser* rdf_parser          = NULL
    cdef raptor_serializer* rdf_serializer  = NULL
    cdef unsigned char *uri_string          = raptor_uri_filename_to_uri_string(srcfname)<commit_msg>changed include from raptor.h to raptor2.h<commit_after>from crdfio cimport *
from cython cimport *
from cpython cimport *
from libc.stdio cimport *
from libc.stdlib cimport *
import os
import sys
from raptorutil import *


__author__ = '<NAME>'
__email__ = '<EMAIL>; <EMAIL>'

#-----------------------------------------------------------------------------------------------------------------------
# default (straight covertion)
#-----------------------------------------------------------------------------------------------------------------------
cdef inline void serialize_handler(void *user_data, raptor_statement* statement):
    raptor_serializer_serialize_statement(<raptor_serializer*>user_data, statement)

cpdef convert(char* srcfname, char* dstformat, char* baseuri=NULL):
    srcformat = get_parser_type(srcfname)
    dstfname  = '%s.%s'%(os.path.splitext(srcfname)[0], get_rdfext(dstformat))
    print 'converting [%s] (%s) ====> [%s] (%s)'%(srcfname, srcformat, dstfname, dstformat)

    # LOCAL VARS
    cdef raptor_world *world                = NULL
    cdef raptor_parser* rdf_parser          = NULL
    cdef raptor_serializer* rdf_serializer  = NULL
    cdef unsigned char *uri_string          = raptor_uri_filename_to_uri_string(srcfname)
{'fraction_non_alphanumeric': 0.27813504823151125, 'fraction_numerical': 0.0012057877813504824, 'mean_word_length': 1.966626936829559, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '5358647', 'n_tokens_mistral': 730, 'n_tokens_neox': 693, 'n_words': 162}