Exemple #1
0
 protected function getLexicon()
 {
     $sXmlFileRealPath = Config::get('path.real.root') . Config::get('path.relative.root_to_app') . Config::get('path.relative.app_to_data') . Config::get('jsreal.lexicon.simple_nlg.xml.' . $this->sLanguage);
     $sXslFileRealPath = Config::get('path.real.root') . Config::get('path.relative.root_to_app') . Config::get('path.relative.app_to_xsl') . Config::get('jsreal.lexicon.simple_nlg.xsl');
     $sJsonLexicon = Xslt::applyXsltTemplateToXml($sXmlFileRealPath, $sXslFileRealPath);
     return Conversion::getArrayFromJson($sJsonLexicon);
 }
 protected function getTestConjugatedVerb()
 {
     $sXmlFileRealPath = Config::get('path.real.root') . Config::get('path.relative.root_to_app') . Config::get('path.relative.app_to_data') . Config::get('jsreal.test.conjugation.xml.' . $this->sLanguage);
     $sXslFileRealPath = Config::get('path.real.root') . Config::get('path.relative.root_to_app') . Config::get('path.relative.app_to_xsl') . Config::get('jsreal.test.conjugation.xsl.' . $this->sLanguage);
     $sJsonConjugatedVerb = Xslt::applyXsltTemplateToXml($sXmlFileRealPath, $sXslFileRealPath);
     $aOriginalList = Conversion::getArrayFromJson($sJsonConjugatedVerb);
     $aProperConjugationTest = array();
     foreach ($aOriginalList as $sUnit => $aInfo) {
         if (!empty($aInfo)) {
             $aProperConjugationTest[$sUnit] = $aInfo;
         }
     }
     return $aProperConjugationTest;
 }