Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.php « web « ems « scripts - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9c918a96a41c47cea74f178da0033f3812b20370 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php

require("lib.php");
require("overview.php");
require("analysis.php");
require("analysis_diff.php");
require("diff.php");
require("sgviz.php");

function head($title) {
  print '<!DOCTYPE html>
<html><head><title>'.$title.'</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript" src="javascripts/prototype.js"></script>
<script language="javascript" src="javascripts/scriptaculous.js"></script>
<script language="javascript" src="hierarchical-segmentation.js"></script>
<script language="javascript" src="base64.js"></script>
<link href="general.css" rel="stylesheet" type="text/css">
<link href="hierarchical-segmentation.css" rel="stylesheet" type="text/css">
<link href="bilingual-concordance.css" rel="stylesheet" type="text/css">
</head>
<body><h2>'.$title."</h2>\n";
}

if (array_key_exists("setStepStatus",$_GET)) { set_step_status($_GET["setStepStatus"]); }
else if (array_key_exists("setup",$_POST) || array_key_exists("setup",$_GET)) {
  load_experiment_info();
  load_comment();

  if (array_key_exists("show",$_GET)) { show(); }
  else if (array_key_exists("diff",$_GET)) { diff(); }
  else if (array_key_exists("analysis",$_GET)) {
    $action = $_GET["analysis"];
    $set = $_GET["set"];
    $id = $_GET["id"];
    if (array_key_exists("id2",$_GET)) { $id2 = $_GET["id2"]; }
    if ($action == "show") { show_analysis(); }
    else if ($action == "bleu_show") { bleu_show(); }
    else if ($action == "ngram_precision_show") { ngram_show("precision");}
    else if ($action == "ngram_recall_show") { ngram_show("recall"); }
    else if ($action == "CoverageSummary_show") { coverage_summary(); }
    else if ($action == "PrecisionRecallDetails_show") { precision_recall_details(); }
    else if ($action == "PrecisionRecallDetailsDiff_show") { precision_recall_details_diff(); }
    else if ($action == "PrecisionByCoverage_show") { precision_by_coverage(); }
    else if ($action == "PrecisionByCoverageDiff_show") { precision_by_coverage_diff(); }
    else if (preg_match("/PrecisionByWordDiff(.+)_show/",$action,$match)) { precision_by_word_diff($match[1]); }
    else if (preg_match("/PrecisionByWord(.+)_show/",$action,$match)) { precision_by_word($match[1]); }
    else if ($action == "CoverageDetails_show") { coverage_details(); }
    else if ($action == "CoverageMatrixDetails_show") { precision_by_coverage_diff_matrix_details(); }
    else if ($action == "SegmentationSummary_show") { segmentation_summary(); }
    else if ($action == "biconcor") { biconcor(base64_decode($_GET["phrase"])); }
    else if ($action == "sgviz") { sgviz($_GET["sentence"]); }
    else if ($action == "sgviz_data") { sgviz_data($_GET["sentence"]); }
    else { print "ERROR! $action"; }
  }
  else if (array_key_exists("analysis_diff_home",$_GET)) {
    $set = $_GET["analysis_diff_home"];
    while (list($parameter,$value) = each($_GET)) {
      if (preg_match("/analysis\-(\d+)\-(.+)/",$parameter,$match)) {
        if ($match[2] == $set) {
          $id_array[] = $match[1];
        }
      }
    }
    if (count($id_array) != 2) {
      print "ERROR: comp 2!";
      exit();
    }
    $id = $id_array[0];
    $id2 = $id_array[1];
    if ($id>$id2) { $i=$id; $id=$id2; $id2=$i; }
    diff_analysis();
  }
  else if (array_key_exists("analysis_diff",$_GET)) {
    $action = $_GET["analysis_diff"];
    $set = $_GET["set"];
    $id = $_GET["id"];
    $id2 = $_GET["id2"];
    if ($action == "bleu_diff") { bleu_diff(); }
    else if ($action == "ngram_precision_diff") { ngram_diff("precision");}
    else if ($action == "ngram_recall_diff") { ngram_diff("recall"); }
    else { print "ERROR! $action"; }
  }
  else { overview(); }
}
else {
  setup();
}

print "</BODY></HTML>\n";