#include <cctype>
#include <cmath>
#include <mtgl/lp_hash_set.hpp>
#include <mtgl/snap_util.h>
#include <mtgl/merge_sort.hpp>
#include <mtgl/mtgl_io.hpp>
#include <mtgl/multimap.hpp>
#include <mtgl/rdf_quad.hpp>
Defines | |
#define | SUBJECT_INDEX 0 |
#define | PREDICATE_INDEX 1 |
#define | OBJECT_INDEX 2 |
#define | CONTEXT_INDEX 3 |
#define | RDFS_SUBPROPERTY "<rdfs:subPropertyOf>" |
#define | RDFS_SUBCLASS "<rdfs:subClassOf>" |
#define | RDFS_DOMAIN "<rdfs:domain>" |
#define | RDFS_RANGE "<rdfs:range>" |
Typedefs | |
typedef lp_hash_set< char *, int, min_insert_function < char *, int > , default_hash_func< char * > , default_eqfcn< char * > > | hash_type |
Functions | |
void | create_index (hash_type *set, int *output_buffer, int num_words) |
int | process_uri (int &num_words, char **words, char *array, int &j, bool count=true) |
Function that encapsulates the processing of a URI element. | |
int | process_node (int &num_words, char **words, char *array, int &j, bool count=true) |
Function that encapsulates the processing of a blank node. | |
int | process_literal (int &num_words, char **words, char *array, int &j, bool count=true) |
Function that encapsulates the processing of a literal. | |
void | process_line (int &num_words, char **words, char *array, int &j, int my_line, int *word_mapping) |
Encapsluates the processing of a line. | |
int | main (int argc, const char *argv[]) |
void process_line | ( | int & | num_words, | |
char ** | words, | |||
char * | array, | |||
int & | j, | |||
int | my_line, | |||
int * | word_mapping | |||
) |
Encapsluates the processing of a line.
num_words | Reference to the global counter for the total number of words. | |
words | The words to be processed, the processed uris, nodes, and literals are added to this array. | |
array | The original string of everything. | |
j | The thread's current index into the string of everything. |
References process_literal(), process_node(), and process_uri().
int process_literal | ( | int & | num_words, | |
char ** | words, | |||
char * | array, | |||
int & | j, | |||
bool | count = true | |||
) |
Function that encapsulates the processing of a literal.
num_words | Reference to the global counter for the total number of words. | |
words | The words to be processed, the processed literal is added to this array. | |
array | The original string of everything. | |
j | The thread's current index into the string of everything. | |
count | A boolean to indicate if the literal should be added to the list of words. |
Referenced by process_line().
int process_node | ( | int & | num_words, | |
char ** | words, | |||
char * | array, | |||
int & | j, | |||
bool | count = true | |||
) |
Function that encapsulates the processing of a blank node.
num_words | Reference to the global counter for the total number of words. | |
words | The words to be processed, the processed node is added to this array. | |
array | The original string of everything. | |
j | The thread's current index into the string of everything. | |
count | A boolean to indicate if the node should be added to the list of words. |
Referenced by process_line().
int process_uri | ( | int & | num_words, | |
char ** | words, | |||
char * | array, | |||
int & | j, | |||
bool | count = true | |||
) |
Function that encapsulates the processing of a URI element.
num_words | Reference to the global counter for the total number of words. | |
words | The words to be processed, the processed URI is added to this array. | |
array | The original string of everything. | |
j | The thread's current index into the string of everything. | |
count | A boolean to indicate if the processed Uri should be added to the list of words. |
Referenced by process_line().