[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
user:zeman:addicter [2011/09/06 15:39]
zeman
user:zeman:addicter [2012/05/15 14:10]
zeman Static files.
Line 38: Line 38:
     * Look for a ''ScriptAlias'' directive. It tells the server: 1. what path on the hard disk contains scripts that can generate dynamic HTML content on the fly, and 2. how the path will be represented in the URL (web address). For example <code>ScriptAlias /cgi/ "C:/Documents and Settings/Dan/Documents/Web/cgi/"</code> says that the URL ''http://localhost/cgi/anyscript.pl'' leads to your script ''C:\Documents and Settings\Dan\Documents\Web\cgi\anyscript.pl'', and that it's a script (i.e., the server shall invoke it and send its output, instead of sending the script itself).     * Look for a ''ScriptAlias'' directive. It tells the server: 1. what path on the hard disk contains scripts that can generate dynamic HTML content on the fly, and 2. how the path will be represented in the URL (web address). For example <code>ScriptAlias /cgi/ "C:/Documents and Settings/Dan/Documents/Web/cgi/"</code> says that the URL ''http://localhost/cgi/anyscript.pl'' leads to your script ''C:\Documents and Settings\Dan\Documents\Web\cgi\anyscript.pl'', and that it's a script (i.e., the server shall invoke it and send its output, instead of sending the script itself).
     * Under Windows, you will also want to set <code>ScriptInterpreterSource registry</code> It tells the server that the Windows registry shall be used to figure out how to run a script (e.g., that ''C:\Perl\Perl.exe'' binary must be run to interpret a ''.pl'' script).     * Under Windows, you will also want to set <code>ScriptInterpreterSource registry</code> It tells the server that the Windows registry shall be used to figure out how to run a script (e.g., that ''C:\Perl\Perl.exe'' binary must be run to interpret a ''.pl'' script).
 +    * CGI scripts will not run under the same environment as a user command line. They will not see the ''PERLLIB'' variable and thus not find the libraries unless we specifically instruct Apache to pass the variable to the CGI environment: <code>PassEnv PERLLIB PERL5LIB</code>
   * Restart the server. On the main Windows panel, there is (typically in the lower right corner) a set of icons, including a new one for Apache. Right-click on it, select Open Apache Monitor, then Restart.   * Restart the server. On the main Windows panel, there is (typically in the lower right corner) a set of icons, including a new one for Apache. Right-click on it, select Open Apache Monitor, then Restart.
  
Line 58: Line 59:
 ==== How to install Addicter ==== ==== How to install Addicter ====
  
-We use ''$CGI'' to refer to the path you registered with Apache as containing CGI scripts (using the ''ScriptAlias'' directive). **NOTE:** If you are using Addicter's own web server or if Addicter content is the only thing you intend to use the server to serve, probably the easiest thing to do is to set the Addicter's ''cgi'' folder as your ''$CGI''.+We use ''$CGI'' to refer to the path you registered with Apache as containing CGI scripts (using the ''ScriptAlias'' directive). **NOTE:** If you are using Addicter's own web server or if Addicter content is the only thing you intend to use the server to serve, probably the easiest thing to do is to set the Addicter's ''cgi'' folder as your ''$CGI''. **NOTE 2:** There are couple of files with static (non-CGI) web content, needed by the CGI scripts. These files (currently ''tabs.gif'' and ''activatables.js'') are in ''$CGI/..''. With Addicter's own web server, this is just fine. If you are using another web server, however, you must copy these files to the appropriate location in your static content directory structure so that the server finds them. They should not be directly in the ''$CGI'' folder because they are not scripts and should not be treated as scripts by the server.
  
   * Addicter uses some general-purpose Perl libraries that are maintained in a separate repository. Download these first, using username ''public'' and password ''public''. Then make sure that Perl finds these libraries. In Linux/bash, the following commands will do that: <code bash>svn --username public checkout https://svn.ms.mff.cuni.cz/svn/dzlib ~/lib   * Addicter uses some general-purpose Perl libraries that are maintained in a separate repository. Download these first, using username ''public'' and password ''public''. Then make sure that Perl finds these libraries. In Linux/bash, the following commands will do that: <code bash>svn --username public checkout https://svn.ms.mff.cuni.cz/svn/dzlib ~/lib
 export PERL5LIB=~/lib:$PERL5LIB</code> In Windows, you can use [[http://tortoisesvn.tigris.org/|TortoiseSVN]] to access the repository. export PERL5LIB=~/lib:$PERL5LIB</code> In Windows, you can use [[http://tortoisesvn.tigris.org/|TortoiseSVN]] to access the repository.
   * Check out the current version of Addicter from the StatMT SVN repository, again using username ''public'' and password ''public'': <code bash>svn --username public checkout https://svn.ms.mff.cuni.cz/svn/statmt/trunk/addicter addicter</code>   * Check out the current version of Addicter from the StatMT SVN repository, again using username ''public'' and password ''public'': <code bash>svn --username public checkout https://svn.ms.mff.cuni.cz/svn/statmt/trunk/addicter addicter</code>
-  * There are two subfolders, ''prepare'' and ''cgi''. Copy the contents of the ''cgi'' folder to ''$CGI''.+  * There are three subfolders, ''testchamber'', ''prepare'' and ''cgi''. Copy the contents of the ''cgi'' folder to ''$CGI''.
   * For every experiment whose data shall be explored by addicter, create a subfolder in ''$CGI'', e.g. ''$CGI/fr-en-exp01''.   * For every experiment whose data shall be explored by addicter, create a subfolder in ''$CGI'', e.g. ''$CGI/fr-en-exp01''.
  
Line 107: Line 108:
 The error classifier currently uses its own monlingual word-alignment of reference translation and the hypothesis. It is invoked as follows: The error classifier currently uses its own monlingual word-alignment of reference translation and the hypothesis. It is invoked as follows:
  
-<code bash>${ADDICTER}/testchamber/align-hmm.pl ref.txt hyp.txt tcali.txt +<code bash>${ADDICTER}/prepare/detecterr.pl -s srcfile -r reffile -h hypfile -w workdir</code
-${ADDICTER}/testchamber/finderrs.pl src.txt hyp.txt ref.txt tcali.txt tcerr.txt + 
-${ADDICTER}/testchamber/errsummary.pl tcerr.txt</code>+and it creates the files ''workdir/tcali.txt'' and ''workdir/tcerr.txt''The input files (src, ref and hyp) can also be gzipped.
  
 Place the files ''tcali.txt'' and ''tcerr.txt'' in the experiment subfolder of ''$CGI'' and the error classes will be displayed during test data browsing in the viewer. Place the files ''tcali.txt'' and ''tcerr.txt'' in the experiment subfolder of ''$CGI'' and the error classes will be displayed during test data browsing in the viewer.
Line 115: Line 116:
 ==== How to use the viewer ==== ==== How to use the viewer ====
  
-First make sure that your web server is running and configured properly and that your index and data files have been prepared in the correct place. If you do not use your own web server, invoke the script ''server.pl'' in the main Addicter folder. It will save something like+First make sure that your web server is running and configured properly and that your index and data files have been prepared in the correct place. If you do not use your own web server, invoke the script ''server.pl'' in the main Addicter folder. It will say something like
  
 <code>Please contact me at: <URL:http://localhost:2588/cgi/index.pl></code> <code>Please contact me at: <URL:http://localhost:2588/cgi/index.pl></code>

[ Back to the navigation ] [ Back to the content ]