<commit_before><?php
/**
 * Limb Web Application Framework
 *
 * @link http://limb-project.com
 *
 * @copyright  Copyright &copy; 2004-2007 BIT
 * @license    LGPL http://www.gnu.org/copyleft/lesser.html
 * @version    $Id: common.inc.php 5415 2007-03-29 10:14:35Z pachanga $
 * @package    i18n
 */
require_once('limb/core/common.inc.php');
require_once(dirname(__FILE__) . '/toolkit.inc.php');

function lmb_i18n($text, $arg1 = null, $arg2 = null)
{
  static $toolkit;

  if(!$toolkit)
    $toolkit = lmbToolkit :: instance();

  return $toolkit->translate($text, $arg1, $arg2);
}

?>
<commit_msg>[svn r5830] -- i18n - added function of a transliteration lmb_translit_russian().<commit_after><?php
/**
 * Limb Web Application Framework
 *
 * @link http://limb-project.com
 *
 * @copyright  Copyright &copy; 2004-2007 BIT
 * @license    LGPL http://www.gnu.org/copyleft/lesser.html
 * @version    $Id: common.inc.php 5830 2007-05-08 11:04:03Z dan82 $
 * @package    i18n
 */
require_once('limb/core/common.inc.php');
require_once(dirname(__FILE__) . '/toolkit.inc.php');

function lmb_i18n($text, $arg1 = null, $arg2 = null)
{
  static $toolkit;

  if(!$toolkit)
    $toolkit = lmbToolkit :: instance();

  return $toolkit->translate($text, $arg1, $arg2);
}


function lmb_translit_russian($input, $encoding = 'utf8')   
{  
  if($encoding != 'utf8')  
    $input = iconv($encoding, 'utf8', $input);  
	
  $arrRus = array('', '', '', '', '', '', '', '', '', '', '', '', '', '',  
                  '', '', '', '', '', '', '', '', '', '', '', '', '', '',  
                  '', '', '', '', '',  
                  '', '', '', '', '', '', '', '', '', '', '', '', '', '',  
                  '', '', '', '', '', '', '', '', '', '', '', '', '', '',  
                  '', '', '', '', '');  
  $arrEng = array('a', 'b', 'v', 'g', 'd', 'e', 'jo', 'zh', 'z', 'i', 'y', 'k', 'l', 'm',  
                  'n', 'o', 'p', 'r', 's', 't', 'u', 'f', 'kh', 'c', 'ch', 'sh', 'sch', '',  
                  'y', '', 'e', 'yu', 'ya',  
                  'A', 'B', 'V', 'G', 'D', 'E', 'JO', 'ZH', 'Z', 'I', 'Y', 'K', 'L', 'M',  
                  'N', 'O', 'P', 'R', 'S', 'T', 'U', 'F', 'KH', 'C', 'CH', 'SH', 'SCH', '',  
                  'Y', '', 'E', 'YU', 'YA');  
                   
  $result = str_replace($arrRus, $arrEng, $input);
	
  if($encoding != 'utf8') return iconv('utf8', $encoding, $result);  
  else return $result;  
}


?>

{'fraction_non_alphanumeric': 0.27055067837190744, 'fraction_numerical': 0.03232242617717478, 'mean_word_length': 2.294349540078844, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3677410', 'n_tokens_mistral': 1017, 'n_tokens_neox': 908, 'n_words': 182}