<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Morphological test</title>
  <script type="text/javascript" src="../../jslingua.js" ></script>
  <script type="text/javascript" src="../../morpho.js" ></script>
  <script type="text/javascript" src="../../ara/ara.morpho.js" ></script>
  <!--script type="text/javascript" src="../../jpn/jpn.morpho.js" ></script-->
  <script type="text/javascript">

  var morpho;

  function loading(){
    var e = document.getElementById("l");

    var langIDs = JsLingua.serviceLanguages("Morpho");
    var i;
    for (i = 0; i < langIDs.length; i++){
      var option = document.createElement("option");
      option.text = langIDs[i];
      e.add(option);
    }

    update();

  }

  function update(){
    var e = document.getElementById("l");
    var langID = e.options[e.selectedIndex].text;
    var morphoClass = JsLingua.getService("Morpho", langID);
    morpho = new morphoClass();
  }

  function conjugate(){
    var verb = document.getElementById("verb").value;
    var result = "<table>";

    var conj = document.getElementById("conj");

    //console.log(morpho.getPronounOpts());

    var tenses = morpho.getTenses();
    result += "<tr><th></th>";
    tenses.forEach(function(element, index, array){
      result += "<th>" + morpho.getTenseName(element) + "</th>";
    });
    result += "</tr>";

    morpho.getPronounOpts().forEach(function(pOpt, pIdx, pTab){
      result += "<tr>";
      result += "<th>" + morpho.getPronounName(pOpt) + "</th>";
      tenses.forEach(function(tOpt, tIdx, tTab){
        result += "<td>" + morpho.getTenseName(element) + "</td>";
      });
      result += "</tr>";
    });

    result += "</table>"

    conj.innerHTML = result;
  }

  </script>

  <style >
  .l {
    display: inline-block;
    border: 1px solid Black;
    vertical-align: middle;
    border-radius: 2px;
    margin: 2px;
    padding: 2px;
  }
  .t {
    background-color: Violet;
  }
  .f {
    background-color: Gray;
  }
  </style>
<commit_msg>testing Arabic conjugation on browser<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Morphological test</title>
  <script type="text/javascript" src="../../jslingua.js" ></script>
  <script type="text/javascript" src="../../morpho.js" ></script>
  <script type="text/javascript" src="../../ara/ara.morpho.js" ></script>
  <!--script type="text/javascript" src="../../jpn/jpn.morpho.js" ></script-->
  <script type="text/javascript">

  var morpho;

  function loading(){
    var e = document.getElementById("l");

    var langIDs = JsLingua.serviceLanguages("Morpho");
    var i;
    for (i = 0; i < langIDs.length; i++){
      var option = document.createElement("option");
      option.text = langIDs[i];
      e.add(option);
    }

    update();

  }

  function update(){
    var e = document.getElementById("l");
    var langID = e.options[e.selectedIndex].text;
    var morphoClass = JsLingua.getService("Morpho", langID);
    morpho = new morphoClass();
  }

  function conjugate(){
    var verb = document.getElementById("verb").value;
    var result = "<table>";

    var conj = document.getElementById("conj");

    //console.log(morpho.getPronounOpts());

    var tenses = morpho.getTenses();
    result += "<tr><th></th>";
    tenses.forEach(function(element, index, array){
      result += "<th>" + morpho.getTenseName(element) + "</th>";
    });
    result += "</tr>";

    morpho.getPronounOpts().forEach(function(pOpt, pIdx, pTab){
      result += "<tr>";
      result += "<th>" + morpho.getPronounName(pOpt) + "</th>";
      //create a new clone
      var allOpts = Object.assign({}, pOpt);
      tenses.forEach(function(tOpt, tIdx, tTab){
        allOpts.tense = tOpt;
        //console.log(tOpt);
        result += "<td>" + morpho.conjugate(verb, allOpts) + "</td>";
      });
      result += "</tr>";
    });

    result += "</table>"

    conj.innerHTML = result;
  }

  </script>

  <style >
  .l {
    display: inline-block;
    border: 1px solid Black;
    vertical-align: middle;
    border-radius: 2px;
    margin: 2px;
    padding: 2px;
  }
  .t {
    background-color: Violet;
  }
  .f {
    background-color: Gray;
  }
  </style>

{'fraction_non_alphanumeric': 0.1933649289099526, 'fraction_numerical': 0.002843601895734597, 'mean_word_length': 2.8653846153846154, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 67, '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': '5604093', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1418, 'n_words': 292}