<commit_before><?php

if (php_sapi_name() != 'cli') {
    die('no');
}

define('INSTALLDIR', dirname(dirname(dirname(__FILE__))));

require INSTALLDIR . "/scripts/commandline.inc";

// temp stuff
require 'yam-config.php';
$yam = new SN_YammerClient($consumerKey, $consumerSecret, $token, $tokenSecret);
$imp = new YammerImporter();

$data = $yam->messages();
/*
  ["messages"]=>
  ["meta"]=> // followed_user_ids, current_user_id, etc
  ["threaded_extended"]=> // empty!
  ["references"]=> // lists the users, threads, replied messages, tags
*/

// 1) we're getting messages in descending order, but we'll want to process ascending
// 2) we'll need to pull out all those referenced items too?
// 3) do we need to page over or anything?

// 20 qualifying messages per hit...
// use older_than to grab more
// (better if we can go in reverse though!)
// meta: The older-available element indicates whether messages older than those shown are available to be fetched. See the older_than parameter mentioned above.

foreach ($data['references'] as $item) {<commit_msg>Full dump of input data in yamdump also for my reference...<commit_after><?php

if (php_sapi_name() != 'cli') {
    die('no');
}

define('INSTALLDIR', dirname(dirname(dirname(__FILE__))));

require INSTALLDIR . "/scripts/commandline.inc";

// temp stuff
require 'yam-config.php';
$yam = new SN_YammerClient($consumerKey, $consumerSecret, $token, $tokenSecret);
$imp = new YammerImporter();

$data = $yam->messages();
var_dump($data);

/*
  ["messages"]=>
  ["meta"]=> // followed_user_ids, current_user_id, etc
  ["threaded_extended"]=> // empty!
  ["references"]=> // lists the users, threads, replied messages, tags
*/

// 1) we're getting messages in descending order, but we'll want to process ascending
// 2) we'll need to pull out all those referenced items too?
// 3) do we need to page over or anything?

// 20 qualifying messages per hit...
// use older_than to grab more
// (better if we can go in reverse though!)
// meta: The older-available element indicates whether messages older than those shown are available to be fetched. See the older_than parameter mentioned above.

foreach ($data['references'] as $item) {
{'fraction_non_alphanumeric': 0.14279197080291972, 'fraction_numerical': 0.004562043795620438, 'mean_word_length': 4.428217821782178, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5264629', 'n_tokens_mistral': 686, 'n_tokens_neox': 653, 'n_words': 245}