countwords($numberofwords, $array);
//3. Count the words
openandselectdatabase($username, $password, $db);
//4. Connect to the database
checkeveryword($row, $query, $result, $numberofwords, $array, $dbname, $category, $subtype, $word, $declination, $person, $tense, $spanish, $genero, $english);
//5. We check every word in the database
syntaxmodels($rowsarray, $numberofwords, $category, $funcion, $case, $wordorder, $addedword);
//6. We check the syntax models
typeassignation($numberofwords, $type, $subtype);
//7. We assign gender to variable type
typeverb($numberofwords, $type, $subtype, $prefix);
//8. We clasified verbs
capitalizedsubstantives($numberofwords, $category, $word, $message);
errordetection($numberofwords, $word, $case, $type, $cword);
//9. We check declination concordances on articles
genderconrcondances($numberofwords, $category, $genero, $case, $type, $neworder, $wordorder, $spanish, $word, $cword, $message);
//10. Translate genders to the target language
reordersyntaxtargetlanguage($numberofwords, $neworder, $addedword, $spanish);
//11. We reorder the sentences by the syntax order for the target language
conjugationconcordances($numberofwords, $category, $word, $person);
//12. We check conjugation concordances
jsonencode($message);
//13. Function to send results
erasememorycloseconnection($numberofwords, $result);
//14. Erase memory and close connection
function countwords(&$numberofwords, &$array)
{
    //3. The number of words are counted and the values are saved in a variable.
    $numberofwords = count($array);
    //We count the number of words
    if ($numberofwords >= 10) {
//We split it into words
countwords($numberofwords, $array);
//3. Count the words
openandselectdatabase($username, $password, $db);
//4. Connect to the database
checkeveryword($row, $query, $result, $numberofwords, $array, $dbname, $category, $subtype, $word, $declination, $person, $tense, $spanish, $genero, $english);
//5. We check every word in the database
syntaxmodels($rowsarray, $numberofwords, $category, $funcion, $case, $wordorder, $addedword);
//6. We check the syntax models
typeassignation($numberofwords, $type, $subtype);
//7. We assign gender to variable type
typeverb($numberofwords, $type, $subtype, $prefix);
//8. We clasified verbs
errordetection($numberofwords, $word, $case, $type, $cword);
//9. We check declination concordances on articles
genderconrcondances($numberofwords, $category, $genero, $case, $type, $type2, $neworder, $wordorder, $spanish);
//10. Translate genders to the target language
reordersyntaxtargetlanguage($numberofwords, $neworder, $addedword, $spanish);
//11. We reorder the sentences by the syntax order for the target language
conjugationconcordances($numberofwords, $category, $word, $person);
//12. We check conjugation concordances
jsonencode($spanish);
//13. Function to send results
erasememorycloseconnection($numberofwords, $result);
//14. Erase memory and close connection
function countwords(&$numberofwords, &$array)
{
    //3. The number of words are counted and the values are saved in a variable.
    $numberofwords = count($array);
    //We count the number of words
    if ($numberofwords >= 10) {