<commit_before><?php 
/**
 * Example use of Edurep search and results.
 */
require_once("edurepsearch.php");

# create with a valid api key
$edurep = new EdurepSearch( "12345" );

# set search terms, default edurep
$edurep->setParameter( "query", "math" );

# set another default record schema
# default lom
$edurep->setParameter( "recordSchema", "oai_dc" );

# set a different amount of records to return each page
# default 10, minimum 1, maximum 100
$edurep->setParameter( "maximumRecords", 7 );

# set a different start records (for paging results)
# default 1
$edurep->setParameter( "startRecord", 3 );

# set to return drilldowns, default none
$edurep->setParameter( "x-term-drilldown", "lom.technical.format:5" );

# set to return an additional recordschema
# can be called multiple times
$edurep->setParameter( "x-recordSchema", "smbAggregatedData" );

# perform a search for lom records
$edurep->lomSearch();

# the raw result is stored in $response
# call the EdurepResults class to fill the result object
$results = new EdurepResults( $edurep->response );

# print the result records
print_r( $results->records );

# print startrecord values for a navigation bar
print_r( $results->navigation );
?>
<commit_msg>Extended example somewhat.<commit_after><?php 
/**
 * Example use of Edurep search and results.
 */
require_once("edurepsearch.php");

# create with a valid api key
$edurep = new EdurepSearch( "12345" );

# set search terms, default edurep
$edurep->setParameter( "query", "math" );

# set another default record schema
# default lom
$edurep->setParameter( "recordSchema", "oai_dc" );

# set a different amount of records to return each page
# default 10, minimum 1, maximum 100
$edurep->setParameter( "maximumRecords", 7 );

# set a different start records (for paging results)
# default 1
$edurep->setParameter( "startRecord", 3 );

# set to return drilldowns, default none
$edurep->setParameter( "x-term-drilldown", "lom.technical.format:5,lom.rights.cost:2" );

# set to return an additional recordschema
# can be called multiple times
$edurep->setParameter( "x-recordSchema", "smbAggregatedData" );

# set recordSchema extra for contributes and classifications
# in the results
$edurep->setParameter( "x-recordSchema", "extra" );

# perform a search for lom records
$edurep->lomSearch();

# the raw result is stored in $response
# call the EdurepResults class to fill the result object
$results = new EdurepResults( $edurep->response );

# print the result records
print_r( $results->records );

# print startrecord values for a navigation bar
print_r( $results->navigation );
?>

{'fraction_non_alphanumeric': 0.1178050652340752, 'fraction_numerical': 0.011895625479662318, 'mean_word_length': 5.163120567375887, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, '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': '7165279', 'n_tokens_mistral': 843, 'n_tokens_neox': 812, 'n_words': 283}