<commit_before><!doctype html>
<html>
<body>
<meta charset='utf-8' />

<span style="font: 15px arial, sans-serif;">Type any Lojban text in the following textarea. The result will be parsed as you type:</span>
<br /><br />

<form id="form1" name="form1" method="post" action="" style="width:100%">
  <textarea id="input_textarea" style="width:100%" rows="8" autofocus></textarea>
  <br />
  <span style="font: 15px arial, sans-serif;">Output mode: </span>
  <select id="optlist" onChange="run_camxes()">
    <option>Raw output</option>
    <option>Condensed</option>
    <option id="default">Prettified</option>
    <option>Prettified + selmaho</option>
    <option>Prettified + sm ext</option>
    <option>Prettified --fm</option>
    <option>Prettified --fm + selmaho</option>
    <option>Prettified --fm + sm ext</option>
  </select>
  <span style="padding-left: 32px; text-align: right; font-size: 12px;">
    <a href="camxes-exp.js.peg" target="_blank">[ Grammar file ]</a>
  </span>
  <span style="padding-left: 24px; text-align: right; font-size: 12px;">
    <a href="camxes.html">[ Switch to standard grammar ]</a>
  </span>
</form>

<div style="display:block; overflow: scroll; max-height:24em; border: solid 1px; padding: 10px; background-color: #DDDDFF;"
     height="24em">
  <pre style="white-space: pre-wrap;"><code id="parse_result" width="100%" height="100%"> </code></pre>
</div>

<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="camxes-exp.js"></script>
<script type="text/javascript" src="camxes_preproc.js"></script>
<script type="text/javascript" src="camxes_postproc.js"></script>

<script>
document.getElementById("default").defaultSelected = true;

/*
 *  Binding the function run_camxes() to keyup event on input_textarea by using jQuery
 */
$('#input_textarea').bind( "keyup",
  function(e) {
    run_camxes();
  } );

function run_camxes() {
	try {
	  var input = $('#input_textarea').val();
	  input = camxes_preprocessing(input);
      var result = camxes.parse(input);
    } catch (e) {
      $('#parse_result').text( e.toString() );
      return;
    }
    var result_str = JSON.stringify(result, undefined, 2);
	/* We get the output mode selected in the combobox */
	var mode = document.getElementById("optlist").selectedIndex;
	/* Postprocessing — if mode == 0, the below function won't modify camxes' output */
	result_str = camxes_postprocessing(result_str, mode);  // @camxes_postproc.js
	/* Retrieve the result */
    $('#parse_result').text( result_str );
}
</script>

</body>
</html>
<commit_msg>camxes-exp.html: Removing stringification of the parser's output.<commit_after><!doctype html>
<html>
<body>
<meta charset='utf-8' />

<span style="font: 15px arial, sans-serif;">Type any Lojban text in the following textarea. The result will be parsed as you type:</span>
<br /><br />

<form id="form1" name="form1" method="post" action="" style="width:100%">
  <textarea id="input_textarea" style="width:100%" rows="8" autofocus></textarea>
  <br />
  <span style="font: 15px arial, sans-serif;">Output mode: </span>
  <select id="optlist" onChange="run_camxes()">
    <option>Raw output</option>
    <option>Condensed</option>
    <option id="default">Prettified</option>
    <option>Prettified + selmaho</option>
    <option>Prettified + sm ext</option>
    <option>Prettified --fm</option>
    <option>Prettified --fm + selmaho</option>
    <option>Prettified --fm + sm ext</option>
  </select>
  <span style="padding-left: 32px; text-align: right; font-size: 12px;">
    <a href="camxes-exp.js.peg" target="_blank">[ Grammar file ]</a>
  </span>
  <span style="padding-left: 24px; text-align: right; font-size: 12px;">
    <a href="camxes.html">[ Switch to standard grammar ]</a>
  </span>
</form>

<div style="display:block; overflow: scroll; max-height:24em; border: solid 1px; padding: 10px; background-color: #DDDDFF;"
     height="24em">
  <pre style="white-space: pre-wrap;"><code id="parse_result" width="100%" height="100%"> </code></pre>
</div>

<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="camxes-exp.js"></script>
<script type="text/javascript" src="camxes_preproc.js"></script>
<script type="text/javascript" src="camxes_postproc.js"></script>

<script>
document.getElementById("default").defaultSelected = true;

/*
 *  Binding the function run_camxes() to keyup event on input_textarea by using jQuery
 */
$('#input_textarea').bind( "keyup",
  function(e) {
    run_camxes();
  } );

function run_camxes() {
	try {
	  var input = $('#input_textarea').val();
	  input = camxes_preprocessing(input);
      var result = camxes.parse(input);
    } catch (e) {
      $('#parse_result').text( e.toString() );
      return;
    }
	/* We get the output mode selected in the combobox */
	var mode = document.getElementById("optlist").selectedIndex;
	/* Postprocessing — if mode == 0, the below function won't modify camxes' output */
	var result_str = camxes_postprocessing(result, mode);  // @camxes_postproc.js
	/* Retrieve the result */
    $('#parse_result').text( result_str );
}
</script>

</body>
</html>

{'fraction_non_alphanumeric': 0.18185335654865545, 'fraction_numerical': 0.015283420390791256, 'mean_word_length': 4.547210300429184, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 0, '>': 121, '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': '296716', 'n_tokens_mistral': 1853, 'n_tokens_neox': 1756, 'n_words': 420}