Login   Register  
PHP Classes
elePHPant
Icontem

File: train.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 3 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";