<commit_before>﻿#targetengine "loop"
#include "../basil.js";

b.noLoop();

// note: basil.js scripts using the loop environment can implement a cleanUp() function, which will be called here when stopped.
// in that function you should remove everything that you don't want to see in the document anymore.
// additionally, you can use this to free up memory since usually all basil.js variables stay in memory until the next start of basil or restart of InDesign (@benedikt: please confirm).

cleanUp(); // run the cleanUp procedure
cleanUp = function() {}; // to be safe: reset cleanUp() after this call ...
<commit_msg>finetuning of cleanUp() call and comment confirmation<commit_after>﻿#targetengine "loop"
#include "../basil.js";

b.noLoop();

/*   
note: basil.js scripts using the loop environment can implement a
cleanUp() function, which will be called here when stopped. in that function
you should remove everything that you don't want to see in the document
anymore. additionally, you can use this to free up memory since all
variables which have been defined in a script in the loop environment stay
in memory until a restart of InDesign.
*/

// run the cleanUp procedure
if (typeof cleanUp === 'function') cleanUp();
cleanUp = null; // to be safe: clear the variable ...
{'fraction_non_alphanumeric': 0.08892355694227769, 'fraction_numerical': 0.0, 'mean_word_length': 4.215447154471545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6107624', 'n_tokens_mistral': 331, 'n_tokens_neox': 324, 'n_words': 181}