diff --git a/php/A_forms.php b/php/A_forms.php index 34b7c9a0764ba4768eae82cfb679bd69a2cd1612..98b2420ae2e4ed2bf4f1af5d5cadb1862888bfb1 100644 --- a/php/A_forms.php +++ b/php/A_forms.php @@ -2,7 +2,7 @@ <form name="about" action="../php/index.php" method="post"><input type="hidden" name="curscr" value="about.php"></form> <form name="team" action="../php/index.php" method="post"><input type="hidden" name="curscr" value="team.php"></form> <form name="contact" action="../php/index.php" method="post"><input type="hidden" name="curscr" value="contact.php"></form> -<form name="help_up" action="../php/index.php" method="post"><input type="hidden" name="curscr" value="help.php"></form> +<form name="help_up" action="../php/index_help.php" method="post"><input type="hidden" name="curscr" value="help.php"></form> <form name="disclaimer" action="../php/index.php" method="post"><input type="hidden" name="curscr" value="disclaimer.php"></form> <form name="language-en" action="#" method="post"><input type="hidden" name="language" value="en"></form> <form name="language-de" action="#" method="post"><input type="hidden" name="language" value="de"></form> diff --git a/php/F_openannis_wide.php b/php/F_openannis_wide.php index 7fe5f000cb9eede7a18b890340a512eab533a082..79582c086fe0c4c70415153aa19182f5bfa521db 100644 --- a/php/F_openannis_wide.php +++ b/php/F_openannis_wide.php @@ -471,7 +471,7 @@ function get_corp(){ <?php -function openANNIS($qu, $corp){ +function openANNIS($qu, $cor, $a_server){ $q = base64_encode($qu); if($corp == "all"){ // all corpora: 2014-07-29-italian-gold-pilot,2014-07-29-german-gold-pilot,2014-07-29-czech-gold-pilot @@ -485,7 +485,8 @@ function openANNIS($qu, $corp){ $c = base64_encode($corp); } - $link = "<script>previewUrl('http://samos.sfs.uni-tuebingen.de:8080/annis/#_q=".$q."&_c=".$c."&cl=5&cr=5&s=0&l=10&_seg=bGVhcm5lcg','div1')</script>"; + //http://samos.sfs.uni-tuebingen.de:8080/annis/ + $link = "<script>previewUrl('".$a_server."#_q=".$q."&_c=".$c."&cl=5&cr=5&s=0&l=10&_seg=bGVhcm5lcg','div1')</script>"; echo $link; } // button: modify previous query @@ -515,12 +516,12 @@ function openANNIS($qu, $corp){ // 3. - ANNIS-Anzeige im MERLIN Fenster (_self) (erweitert, ohne linke Taskleiste) if(!empty($_POST["featq"])){ - openANNIS($_POST["featq"], "all"); + openANNIS($_POST["featq"], "all", $annis_server); } else{ $aql = process_post(); $corpus = get_corp(); - openANNIS($aql, $corpus); + openANNIS($aql, $corpus, $annis_server); } ?> diff --git a/php/F_showdocuments.php b/php/F_showdocuments.php index 6ce2925317b3fcaa2cba3b90fc30fc4681ebad56..283247df371c5345c3636a5de4dad41fad7ebf74 100644 --- a/php/F_showdocuments.php +++ b/php/F_showdocuments.php @@ -293,13 +293,15 @@ function create_table($data, $json_results, $trans) { // makes SOLR call and returns json array with all (or selected) data -function runMyFunction($q) { +function runMyFunction($q, $s_server) { // jSON URL which should be requested // this works: $json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/texts/select?q=_test_level_cefr%3AC1&wt=json'; // this works too: $json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/texts/select?q=text%3AWohnung+AND+_test_language%3AGerman&wt=json'; - $json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/final/select?q='.$q.'&rows=3000&fl=id%2C+_test_language%2C+_rating_fair_cefr%2C+_author_L1%2C+_author_id%2C+th1%2C+th2%2C+text%2C+_test_level_cefr%2C+_task_id%2C+_author_age%2C+_author_gender%2C+_rating_grammatical_accuracy%2C+_rating_vocabulary_range%2C+_rating_coherence%2C+_rating_sociolinguistic_appropriateness%2C+_rating_orthography%2C+_rating_vocabulary_control%2C+_rating_fair_cefr_rough%2C+_rating_general_linguistic_range&wt=json'; + $json_url = $s_server.'/select?q='.$q.'&rows=3000&fl=id%2C+_test_language%2C+_rating_fair_cefr%2C+_author_L1%2C+_author_id%2C+th1%2C+th2%2C+text%2C+_test_level_cefr%2C+_task_id%2C+_author_age%2C+_author_gender%2C+_rating_grammatical_accuracy%2C+_rating_vocabulary_range%2C+_rating_coherence%2C+_rating_sociolinguistic_appropriateness%2C+_rating_orthography%2C+_rating_vocabulary_control%2C+_rating_fair_cefr_rough%2C+_rating_general_linguistic_range&wt=json'; + + //$json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/final/select?q='.$q.'&rows=3000&fl=id%2C+_test_language%2C+_rating_fair_cefr%2C+_author_L1%2C+_author_id%2C+th1%2C+th2%2C+text%2C+_test_level_cefr%2C+_task_id%2C+_author_age%2C+_author_gender%2C+_rating_grammatical_accuracy%2C+_rating_vocabulary_range%2C+_rating_coherence%2C+_rating_sociolinguistic_appropriateness%2C+_rating_orthography%2C+_rating_vocabulary_control%2C+_rating_fair_cefr_rough%2C+_rating_general_linguistic_range&wt=json'; $username = 'merlin'; // authentication $password = 'merlin23'; // authentication @@ -355,7 +357,7 @@ function createsubcorpus($ids){ $querytest=process_post(); //echo "QUERY:".$querytest; -$json_results = runmyfunction($querytest); //check! +$json_results = runmyfunction($querytest,$solr_server); //check! if($json_results['response']['numFound']==0){ diff --git a/php/F_showkwic.php b/php/F_showkwic.php index 169d968a0460e673bea9984e705301101a1c6821..430ece93680c17c540a682239cbf57dd21cb8db6 100644 --- a/php/F_showkwic.php +++ b/php/F_showkwic.php @@ -38,10 +38,11 @@ function process_post(){ return $q; } -function runMyFunction($querystring) { +function runMyFunction($querystring, $s_server) { // jSON URL which should be requested - $json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/final/select?q='.$querystring.'&rows=500&wt=json'; + $json_url = $s_server.'select?q='.$querystring.'&rows=500&wt=json'; + //$json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/final/select?q='.$querystring.'&rows=500&wt=json'; //pilot: $json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/pilot/select?q='.$querystring.'&rows=500&wt=json'; //$json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/texts/select?q=meta_test_level_cefr%3AC1&fl=text_de&wt=json'; @@ -71,7 +72,7 @@ function runMyFunction($querystring) { //$q_tmp = process_post(); //echo "QUERY:".$q_tmp; -$json_results = runMyFunction(process_post()); +$json_results = runMyFunction(process_post(),$solr_server); //echo $json_results['response']['docs'][1]['text'][0]; // the json result will always have (docs array) -- diff --git a/php/F_showstatistics.php b/php/F_showstatistics.php index 60122e6738ad19d96524535b3c5c003b3032051a..b49f80e27089bcbe711144d6ec41b4266abdbb0f 100644 --- a/php/F_showstatistics.php +++ b/php/F_showstatistics.php @@ -67,12 +67,13 @@ function process_post(){ } -function runMyFunction($querystring) { +function runMyFunction($querystring,$s_server) { $jtest; foreach($querystring as $ind => $que){ // jSON URL which should be requested // pilot $json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/pilot/select?q='.$que.'&rows=3000&wt=json'; - $json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/final/select?q='.$que.'&rows=500&wt=json'; + $json_url = $s_server.'/select?q='.$que.'&rows=500&wt=json'; + //$json_url = 'http://samos.sfs.uni-tuebingen.de:8080/solr/final/select?q='.$que.'&rows=500&wt=json'; $username = 'merlin'; // authentication $password = 'merlin23'; // authentication @@ -226,7 +227,7 @@ function create_corp_features($q_results, $f_names, $solrTOannis, $trans, $abbre $res .= '<tr class="border_bottom_blue"><td class="stats" colspan="2">'.$trans['select_llf'][$_SESSION['lang']].'</td></tr>'; $select_llf = 1; - switch($d){ + /*switch($d){ case (preg_match("/^l_feat_g/", $d) ? true : false) : $res .= '<tr class="border_bottom_blue"><td class="stats" colspan="2">'.$trans['grammar'][$_SESSION['lang']].'</td></tr>'; case (preg_match("/^l_feat_o/", $d) ? true : false) : @@ -241,7 +242,7 @@ function create_corp_features($q_results, $f_names, $solrTOannis, $trans, $abbre $res .= '<tr class="border_bottom_blue"><td class="stats" colspan="2">'.$trans['socioling'][$_SESSION['lang']].'</td></tr>'; case (preg_match("/^l_feat_p/", $d) ? true : false) : $res .= '<tr class="border_bottom_blue"><td class="stats" colspan="2">'.$trans['pragmatics'][$_SESSION['lang']].'</td></tr>'; - } + }*/ } else if(preg_match("/^rel_l_feat/", $d) & !($select_rel_llf)){ @@ -472,7 +473,7 @@ function create_single_doc_features($q_results, $f_names, $solrTOannis, $trans){ } -$json_results = runMyFunction(process_post()); +$json_results = runMyFunction(process_post(),$solr_server); ?> diff --git a/php/_includes/head.php b/php/_includes/head.php index b0eb1cbd755a89edd8e9ef68a0394852cff75ae0..e1973dd7d4d749f4cd485bf09115bf02c5f1a05d 100644 --- a/php/_includes/head.php +++ b/php/_includes/head.php @@ -2,6 +2,14 @@ session_set_cookie_params(86400); session_start(); header('Cache-Control: private, max-age=300'); + // server adresses + + // ANNIS installation -- called from script 'F_openannis_wide.php' + $annis_server = "http://sdcsfe03.eurac.edu/annis/"; + + // SOLR installation -- called from scripts 'F_showkwic.php', 'F_showdocuments.php' and 'F_showstatistics.php'. + $solr_server = "http://sdcsfe03.eurac.edu/solr/final/"; + // available languages $language_glosses = array('cz' => 'czech', 'de' => 'german', 'en' => 'english', 'it' => 'italian');