当前位置: 首页>>代码示例>>PHP>>正文


PHP loadModels函数代码示例

本文整理汇总了PHP中loadModels函数的典型用法代码示例。如果您正苦于以下问题:PHP loadModels函数的具体用法?PHP loadModels怎么用?PHP loadModels使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了loadModels函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initialize

 /**
  * Override intialize of the Shell
  *
  * @access public
  */
 function initialize()
 {
     $this->models = @loadModels();
     foreach ($this->models as $model) {
         $class = Inflector::camelize(r('.php', '', $model));
         $this->models[$model] = $class;
         $this->{$class} =& new $class();
     }
     $this->out('Model classes:');
     $this->out('--------------');
     foreach ($this->models as $model) {
         $this->out(" - {$model}");
     }
 }
开发者ID:kaz0636,项目名称:openflp,代码行数:19,代码来源:console.php

示例2: application

#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#    You can use Quran Analysis code, framework or corpora in your website
#	 or application (commercial/non-commercial) provided that you link
#    back to www.qurananalysis.com and sufficient credits are given.
#
#  ====================================================================
require_once "../global.settings.php";
$lang = "AR";
if (isset($_GET['lang'])) {
    $lang = $_GET['lang'];
}
loadModels("core", $lang);
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Quran Word Collocation | Quran Analysis</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Collocation of words in the Quran">
    <meta name="author" content="">

	<script type="text/javascript" src="<?php 
echo $JQUERY_PATH;
?>
" ></script>
	<script type="text/javascript" src="<?php 
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:word-context-collocation.php

示例3: application

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#    You can use Quran Analysis code, framework or corpora in your website
#	 or application (commercial/non-commercial) provided that you link
#    back to www.qurananalysis.com and sufficient credits are given.
#
#  ====================================================================
require_once "../global.settings.php";
require_once "../libs/core.lib.php";
loadModels("core,qac", "AR");
$LEMMA_TO_SIMPLE_WORD_MAP = loadLemmaToSimpleMappingTable();
printHTMLPageHeader();
//$qacMasterTableEntryArr2 = getModelEntryFromMemory("AR","MODEL_QAC","QAC_POS",$qacLocation);
$qacPoSTagsIterator = getAPCIterator("AR\\/MODEL_QAC\\/QAC_POS\\/.*");
$QURAN_TEXT = getModelEntryFromMemory("AR", "MODEL_CORE", "QURAN_TEXT", "");
$TOTALS = getModelEntryFromMemory("AR", "MODEL_CORE", "TOTALS", "");
$PAUSEMARKS = $TOTALS['PAUSEMARKS'];
preprint_r($PAUSEMARKS);
foreach ($qacPoSTagsIterator as $qacPoSTagsIteratorCursor) {
    $POS_ARR = $qacPoSTagsIteratorCursor['value'];
    $key = $qacPoSTagsIteratorCursor['key'];
    $POS = getEntryKeyFromAPCKey($key);
    if ($POS == "N" || $POS == "PN" || $POS == "ADJ") {
        continue;
    }
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:generate-stopwords-ar-strict-level2.php

示例4: loadModels

if ($isInTestScript) {
    $query = $testQuery;
}
$originalQuery = $query;
$script = $_GET['script'];
if (empty($script)) {
    $script = "simple";
}
///DETEDCT LANGUAGE //LOCATION SIGNIFICANT
if (isArabicString($query)) {
    $lang = "AR";
    $direction = "rtl";
}
//echoN(memory_get_peak_usage());
//echoN(time());
loadModels("core,search,qac,ontology", $lang);
//echoN(time());
$RESOURCES = getModelEntryFromMemory($lang, "MODEL_CORE", "RESOURCES", "");
$META_DATA = getModelEntryFromMemory($lang, "MODEL_CORE", "META_DATA", "");
$significantWords = array();
//echoN($query);exit;
//echoN(memory_get_peak_usage());
//$TRANSLATION_MAP_EN_TO_AR = apc_fetch("WORDS_TRANSLATIONS_EN_AR");
//preprint_r($TRANSLATION_MAP_EN_TO_AR);
$isPhraseSearch = false;
$isQuestion = false;
$isColumnSearch = false;
$columnSearchType = null;
$columnSearchKeyValParams = null;
$noDerivationsConstraint = false;
$noOntologyExtentionConstraint = false;
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:query.handling.common.php

示例5: html_entity_decode

require_once "../libs/core.lib.php";
require_once "../libs/search.lib.php";
$lang = "AR";
if (isset($_GET['lang'])) {
    $lang = $_GET['lang'];
}
$word = $_GET['word'];
$word = html_entity_decode($word);
if (empty($word)) {
    exit;
}
if (isArabicString($word)) {
    loadModels("core", "AR");
    $lang = "AR";
} else {
    loadModels("core", "EN");
    $lang = "EN";
}
$similarWordsArr = getSimilarWords($lang, array($word));
?>

<br>
<b>Similar Words (Character Similarity)</b>
<ul>
<?php 
$i = 0;
foreach ($similarWordsArr as $similarWord => $score) {
    if ($i++ > 20) {
        break;
    }
    ?>
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:simmilar-words.ajax.service.php

示例6: application

#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#    You can use Quran Analysis code, framework or corpora in your website
#	 or application (commercial/non-commercial) provided that you link
#    back to www.qurananalysis.com and sufficient credits are given.
#
#  ====================================================================
require_once "../global.settings.php";
$lang = "AR";
if (isset($_GET['lang'])) {
    $lang = $_GET['lang'];
}
loadModels("core,qac", $lang);
$parameter = $_GET['parameter'];
$nGramesArr = array();
$posPatternString = trim($parameter);
$nGramesArr = getPoSNGrams($posPatternString);
$avgCollocationFreq = array_sum($nGramesArr);
$nGramsCount = count($nGramesArr);
?>
					
					<table id='ngrams-results-table'>
					<thead>
					<tr>
						<td colspan='2'>
							
							Number of N-Grams:<b><?php 
echo addCommasToNumber($nGramsCount);
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:pos-ngrams.ajax.service.php

示例7: application

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#    You can use Quran Analysis code, framework or corpora in your website
#	 or application (commercial/non-commercial) provided that you link
#    back to www.qurananalysis.com and sufficient credits are given.
#
#  ====================================================================
require_once "../global.settings.php";
$lang = "AR";
loadModels("", $lang);
$QURAN_TEXT = getModelEntryFromMemory($lang, "MODEL_CORE", "QURAN_TEXT", "");
preprint_r($QURAN_TEXT[1][1]);
$location = "1:1:1";
$qacMasterTableEntry = getModelEntryFromMemory("AR", "MODEL_QAC", "QAC_MASTERTABLE", $location);
preprint_r($qacMasterTableEntry);
$qaOntologyConceptsIterator = getAPCIterator("ALL\\/MODEL_QA_ONTOLOGY\\/CONCEPTS\\/.*");
foreach ($qaOntologyConceptsIterator as $conceptsCursor) {
    $conceptNameID = getEntryKeyFromAPCKey($conceptsCursor['key']);
    $conceptArr = $conceptsCursor['value'];
    $conceptLabelAR = $conceptArr['label_ar'];
    $conceptLabelEN = $conceptArr['label_en'];
    $conceptFrequency = $conceptArr['frequency'];
    $conceptWeight = $conceptArr['weight'];
    preprint_r($conceptArr);
    break;
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:codescratch.php

示例8: application

#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#    You can use Quran Analysis code, framework or corpora in your website
#	 or application (commercial/non-commercial) provided that you link
#    back to www.qurananalysis.com and sufficient credits are given.
#
#  ====================================================================
require_once "../global.settings.php";
require_once "../libs/search.lib.php";
//only arabic is supported here, english $lang spoils the functions
$lang = "AR";
loadModels("core,search,qac", $lang);
$WORDS_TRANSLATIONS_EN_AR = apc_fetch("WORDS_TRANSLATIONS_EN_AR");
$WORDS_TRANSLATIONS_AR_EN = apc_fetch("WORDS_TRANSLATIONS_AR_EN");
$WORDS_TRANSLITERATION = apc_fetch("WORDS_TRANSLITERATION");
$word = $_GET['word'];
$wordInfoArr = getWordInfo($word, $MODEL_CORE, $MODEL_SEARCH, $MODEL_QAC);
if (empty($wordInfoArr)) {
    showTechnicalError("Word not found");
    $suggestionsArr = getSimilarWords($lang, array($word));
    if (!empty($suggestionsArr)) {
        $suggestionsArr = array_slice($suggestionsArr, 0, 10);
        echoN("<b>Do you mean</b>:<br>" . join(", ", array_keys($suggestionsArr)));
    }
    exit;
}
//preprint_r($wordInfoArr);
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:wordsinfo.ajax.service.php

示例9: loadModels

require_once "../libs/graph.lib.php";
$direction = "ltr";
$lang = $_GET['lang'];
$presentation = $_GET['presentation'];
if (empty($lang)) {
    $lang = "AR";
}
if (empty($presentation)) {
    $presentation = "TREE";
}
if ($lang == "AR") {
    $lang = "AR";
    $direction = "rtl";
}
//echoN(time());
loadModels("core,ontology", $lang);
//echoN(time());
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Full Quran Ontology Graph | Quran Analysis</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Full Quran Ontology Visualization Graph">
    <meta name="author" content="">

	<script type="text/javascript" src="<?php 
echo $JQUERY_PATH;
?>
" ></script>
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:ontology-full-quran-graph.php

示例10: application

#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#    You can use Quran Analysis code, framework or corpora in your website
#	 or application (commercial/non-commercial) provided that you link
#    back to www.qurananalysis.com and sufficient credits are given.
#
#  ====================================================================
require "../global.settings.php";
require_once dirname(__FILE__) . "/../libs/core.lib.php";
if (isDevEnviroment()) {
    printHTMLPageHeader();
}
$cacheInfo = apc_cache_info('user');
echoN("CACHE MEM BEFROE:" . $cacheInfo['mem_size']);
apc_clear_cache();
$cacheInfo = apc_cache_info('user');
echoN("CACHE MEM AFTER CLEAR:" . $cacheInfo['mem_size']);
loadModels("core,search,qac,qurana,wordnet", "EN");
$cacheInfo = apc_cache_info('user');
echoN("CACHE MEM AFTER RELOAD:" . $cacheInfo['mem_size']);
preprint_r($cacheInfo);
echoN("DONE");
?>




开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:26,代码来源:reload-models.php

示例11: application

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#    You can use Quran Analysis code, framework or corpora in your website
#	 or application (commercial/non-commercial) provided that you link
#    back to www.qurananalysis.com and sufficient credits are given.
#
#  ====================================================================
require_once "../global.settings.php";
require_once "../libs/core.lib.php";
loadModels("core,ontology", "AR");
$LEMMA_TO_SIMPLE_WORD_MAP = loadLemmaToSimpleMappingTable();
function showExcludeFor($type, $value, $secIndex = 1, $savedValue = null)
{
    ?>
	<div id='<?php 
    echo $type . "_" . $secIndex;
    ?>
'>
	<h2><?php 
    echo $value;
    ?>
</h2>
	<?php 
    if ($type == "images") {
        ?>
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:ontology-cleaner.php

示例12: loadModels

require_once "../libs/core.lib.php";
require_once "../libs/microsoft.translator.api.lib.php";
require_once "../libs/pos.tagger.lib.php";
require_once "../libs/ontology.lib.php";
require_once "../libs/custom.translation.table.lib.php";
require_once "../libs/graph.lib.php";
require_once "../libs/owllib/OWLLib.php";
require_once "../libs/owllib/reader/OWLReader.php";
require_once "../libs/owllib/memory/OWLMemoryOntology.php";
require_once "../libs/owllib/writer/OWLWriter.php";
$ONTOLOGY_EXTRACTION_FOLDER = "../data/ontology/extraction/";
$lang = "AR";
if (isset($_GET['lang'])) {
    $lang = $_GET['lang'];
}
loadModels("core,search,qac,qurana,wordnet", $lang);
//$UTHMANI_TO_SIMPLE_WORD_MAP_AND_VS = loadUthmaniToSimpleMappingTable();
//preprint_r($UTHMANI_TO_SIMPLE_WORD_MAP_AND_VS);exit;
//$UTHMANI_TO_SIMPLE_LOCATION_MAP = apc_fetch("UTHMANI_TO_SIMPLE_LOCATION_MAP");
//$LEMMA_TO_SIMPLE_WORD_MAP = loadLemmaToSimpleMappingTable();
$pauseMarksArr = getPauseMarksArrByFile($pauseMarksFile);
$WORDS_TRANSLATIONS_EN_AR = apc_fetch("WORDS_TRANSLATIONS_EN_AR");
$WORDS_TRANSLATIONS_AR_EN = apc_fetch("WORDS_TRANSLATIONS_AR_EN");
$WORDS_TRANSLITERATION = apc_fetch("WORDS_TRANSLITERATION");
$CUSTOM_TRANSLATION_TABLE_EN_AR = loadTranslationTable();
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Quran Analytics | Ontology Extraction </title>
开发者ID:AhmedAMohamed,项目名称:qurananalysis,代码行数:31,代码来源:extract-ontology.php


注:本文中的loadModels函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。