PHP Classes

File: train.php

Recommend this page to a friend!
  Classes of Juanjo López   PHP Language Detector   train.php   Download  
File: train.php
Role: Example script
Content type: text/plain
Description: Configuration script
Class: PHP Language Detector
Detect the idiom of a text automatically
Author: By
Last change:
Date: 12 years ago
Size: 322 bytes
 

Contents

Class file image Download
<?php

require_once ("lib/LangDetectorTrainer.php");

echo
"Creating language models\n";
echo
"be patient, this will take some time\n";

set_time_limit(-1);

$l = new LangDetectorTrainer();
$l->train();

echo
"Models created for the following languages: ", implode(", ",$l->get_trained_languages()),"\n";

echo
"done.\n";