<commit_before><?php
function HookOcrstreamEditAfterfileoptions (){ // Hook for OCR on single resource (resource edit)

    global $ref;
    global $lang;
    global $baseurl;
    global $ocr_global_language;
    
    $param_1 = 'X'; // placeholder for optional processing parameter for tesseract
    
    ?>
    <div class="Question" id="question_ocr">
    <label for="ocr_single_resource"><?php echo $lang["ocr_single_resource"]?></label>
    <input type="button" name="ocr_start" value="<?php echo $lang["ocr_start"]?>">
    </div><!-- end of question_copyfrom -->
    <script>
        jQuery('[name="ocr_start"]').click(function(){
            jQuery.get('<?php echo $baseurl ?>/plugins/ocrstream/pages/scan.php', { ref: '<?php echo $ref ?>', lang : '<?php echo $ocr_global_language ?>', param_1 : '<?php echo $param_1 ?>'}, function(data){
                var1 = data;
                console.log(JSON.parse(var1)); // debug
                alert (JSON.parse(var1)); // debug 
            });

        });
    </script>
    <?php
//    $resource_path = get_resource_path($ref,true,"",false,"");
//    echo $resource_path; // debug
}

function HookOcrstreamEditBeforeaccessselector () {
    echo 'blubbblibubbli';
}<commit_msg>code style<commit_after><?php
function HookOcrstreamEditAfterfileoptions()
        { // Hook for OCR on single resource (resource edit)
        global $ref;
        global $lang;
        global $baseurl;
        global $ocr_global_language;    
        $param_1 = 'X'; // placeholder for optional processing parameter for tesseract    
        ?>
        <div class="Question" id="question_ocr">
        <label for="ocr_single_resource"><?php echo $lang["ocr_single_resource"]?></label>
        <input type="button" name="ocr_start" value="<?php echo $lang["ocr_start"]?>">
        </div><!-- end of question_copyfrom -->
        <script>
        jQuery('[name="ocr_start"]').click(function()
                {
                jQuery.get('<?php echo $baseurl ?>/plugins/ocrstream/pages/scan.php', { ref: '<?php echo $ref ?>', lang : '<?php echo $ocr_global_language ?>', param_1 : '<?php echo $param_1 ?>'}, function(data)
                        {
                        var1 = data;
                        console.log(JSON.parse(var1)); // debug
                        alert (JSON.parse(var1)); // debug 
                        });
                });
        </script>
        <?php
//        $resource_path = get_resource_path($ref,true,"",false,"");
//        echo $resource_path; // debug
        }

function HookOcrstreamEditBeforeaccessselector () {
    echo 'blubbblibubbli';
}
{'fraction_non_alphanumeric': 0.15795497901564287, 'fraction_numerical': 0.004578405188859214, 'mean_word_length': 2.422976501305483, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 33, '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': '2042625', 'n_tokens_mistral': 768, 'n_tokens_neox': 759, 'n_words': 165}