<commit_before>import wrapper from './pdftotext-wrapper';
import parser from './parser';
import {removeDuplicateWords, mergeWordsInLines} from './processor';

// Unhandled rejection handling
//
process.on('unhandledRejection', (reason) => {
  console.log('Unhandled Rejection, reason:', reason);
  if (reason.stack) {
    console.err(reason.stack);
  }
});

// Main processor
//
export default async function pdftojson(pdfFileName, options = {}) {
  var htmlData, pages;
<commit_msg>Ignore uncaught rejection setup for istanbul<commit_after>import wrapper from './pdftotext-wrapper';
import parser from './parser';
import {removeDuplicateWords, mergeWordsInLines} from './processor';

// Unhandled rejection handling
//
/* istanbul ignore next */
process.on('unhandledRejection', (reason) => {
  console.log('Unhandled Rejection, reason:', reason);
  if (reason.stack) {
    console.err(reason.stack);
  }
});

// Main processor
//
export default async function pdftojson(pdfFileName, options = {}) {
  var htmlData, pages;

{'fraction_non_alphanumeric': 0.142578125, 'fraction_numerical': 0.0, 'mean_word_length': 4.790960451977401, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2300470', 'n_tokens_mistral': 308, 'n_tokens_neox': 304, 'n_words': 80}