I've made some modifications to the query page of BNCweb so we can make queries rather easily.
Here's the screenshot.
This modified version offers the following functionality:
-You can easily build queries with pull-down menus.
-You can start a query by pressing the Enter key; you don't have to click on the [Start Query] button.
-The IME is disabled in the query box on IE and Firefox 3. (This is effective at least in a Japanese OS environment.)
-A brief manual is offered on the query page.
It is available under the terms of the GNU General Public License Version 3, and can be downloaded here: modifiedBNCweb20100111.zip
I hope this will be of any help, and any comments and suggestions will be welcome.
ラベル Technical Stuff (in English) の投稿を表示しています。 すべての投稿を表示
ラベル Technical Stuff (in English) の投稿を表示しています。 すべての投稿を表示
2010年1月11日月曜日
How to install BNCweb 4.3
The following procedure is based on my installation of BNCweb 4.3 on Ubuntu 9.10. Please make necessary changes according to the version of BNCweb and to your system environment.
First, install the following packages, if not installed yet.
apache2
mysql-server-5.0
libparse-recdescent-perl
flex
bison
libncurses5-dev
subversion
$ sudo mkdir /BNC_XML (* or whatever)
$ tar xvzfBNCweb_version_4.3.tar.gz
$ sudo mv ~/BNCweb_version_4.3 /BNC_XML/
$ cd /BNC_XML/BNCweb_version_4.3
$ sudo chmod -R 755 cgi-bin
$ sudo chmod -R 755 lib_files
$ svn export https://cwb.svn.sourceforge.net/svnroot/cwb/cwb/trunk cwb-3.0
$ cd cwb-3.0
modify "config.mk"
---
(line 41)
include $(TOP)/config/platform/linux
---
$ make clean
$ make depend
$ make all
$ sudo make install
$ tar xvzf Perl-CWB-2.2.101.tar.gz
$ cd CWB
$ rm ._Makefile.PL
$ alias gtar='COPYFILE_DISABLE=true tar'
$ perl Makefile.PL
$ make
$ sudo make install
$ tar xvzf Perl-CWB-CL-2.2.101.tar.gz
$ cd CWB-CL
$ rm ._Makefile.PL
$ make
$ sudo make install
$ sudo mkdir /usr/local/share/cwb
$ sudo mkdir /usr/local/share/cwb/registry
$ sudo mkdir /usr/local/share/cwb/data
$ sudo mkdir /BNC_XML/Texts
$ cd /BNC_XML/Texts
(copy texts.tar.gz on Disk 1 of BNC-XML to /BNC_XML/Texts/)
$ tar xvzf texts.tar.gz
$ sudo cd ../BNCweb_version_4.3/BNC_encoder/
$ sudo perl BNCweb/EncodeBNC.perl -n BNC-XML -M 1000 -f -v /usr/local/share/cwb/data/ /BNC_XML/Texts/
(* "-M 1000" specifies the allocated memory size (in MB).
It took more about 3.5 hours on a PC with Athlon X2 BE-2400 and 3GB memory.)
$ sudo perl BNCweb/MakeFreqTables.perl -n BNC-XML -M 1000 -f -v
(* It took about 30 minutes on my PC.)
$ cd ../lib_files
(modify "bncConfigXML.pm")
---
(line 51)
$bwWebServer = "http(s)://your.server.name.com";
(line 62)
$bwCorpus = "BNC-XML";
(line 114)
$bwSuperuser = 'your_account'; (specify the administrative account)
---
$ sudo mkdir /usr/local/share/bncweb
$ sudo chmod 777 /usr/local/share/bncweb
$ cd ../BNC_encoder
$ sudo perl ../setup/make_MySQL_tables.pl
(When asked for the directory and prefix of the tables, just press [Enter].)
(* It took about 5 minutes on my PC.)
Configure the apache files.
Add the following lines into the appropriate apache config file.
(e.g. just before "</VirtualHost>" in /etc/apache2/sites-available/ssl)
---
Alias /bncweb/ /BNC_XML/BNCweb_version_4.3/
Alias /bncweb /BNC_XML/BNCweb_version_4.3/
ScriptAlias /bncweb-cgi/ /BNC_XML/BNCweb_version_4.3/cgi-bin/
<Directory /BNC_XML/BNCweb_version_4.3>
Options Indexes FollowSymLinks ExecCGI
AuthType Basic
AuthName bncweb
AuthUserFile /etc/bncpass
require valid-user
SetEnv PERL5LIB /BNC_XML/BNCweb_version_4.3/lib_files
</Directory>
---
Restart apache2.
Set the password for each user.
$ sudo htpasswd /etc/bncpass [username]
(Add -c option (htpasswd -c /etc/bncpass [username]) when you add the first user.)
Edit /etc/apparmor.d/usr.sbin.mysqld and add the following line befor the "}" at the end of the file:
---
/usr/local/share/bncweb/* rw,
---
$ sudo /etc/init.d/apparmor restart
$ sudo /etc/init.d/mysql restart
This enables MySQL to write a file to /usr/local/share/bncweb/.
Now access the site: http(s)://hostname/bncweb-cgi/BNCweb.pl
The interface of BNCweb will appear.
First, install the following packages, if not installed yet.
apache2
mysql-server-5.0
libparse-recdescent-perl
flex
bison
libncurses5-dev
subversion
$ sudo mkdir /BNC_XML (* or whatever)
$ tar xvzfBNCweb_version_4.3.tar.gz
$ sudo mv ~/BNCweb_version_4.3 /BNC_XML/
$ cd /BNC_XML/BNCweb_version_4.3
$ sudo chmod -R 755 cgi-bin
$ sudo chmod -R 755 lib_files
$ svn export https://cwb.svn.sourceforge.net/svnroot/cwb/cwb/trunk cwb-3.0
$ cd cwb-3.0
modify "config.mk"
---
(line 41)
include $(TOP)/config/platform/linux
---
$ make clean
$ make depend
$ make all
$ sudo make install
$ tar xvzf Perl-CWB-2.2.101.tar.gz
$ cd CWB
$ rm ._Makefile.PL
$ alias gtar='COPYFILE_DISABLE=true tar'
$ perl Makefile.PL
$ make
$ sudo make install
$ tar xvzf Perl-CWB-CL-2.2.101.tar.gz
$ cd CWB-CL
$ rm ._Makefile.PL
$ make
$ sudo make install
$ sudo mkdir /usr/local/share/cwb
$ sudo mkdir /usr/local/share/cwb/registry
$ sudo mkdir /usr/local/share/cwb/data
$ sudo mkdir /BNC_XML/Texts
$ cd /BNC_XML/Texts
(copy texts.tar.gz on Disk 1 of BNC-XML to /BNC_XML/Texts/)
$ tar xvzf texts.tar.gz
$ sudo cd ../BNCweb_version_4.3/BNC_encoder/
$ sudo perl BNCweb/EncodeBNC.perl -n BNC-XML -M 1000 -f -v /usr/local/share/cwb/data/ /BNC_XML/Texts/
(* "-M 1000" specifies the allocated memory size (in MB).
It took more about 3.5 hours on a PC with Athlon X2 BE-2400 and 3GB memory.)
$ sudo perl BNCweb/MakeFreqTables.perl -n BNC-XML -M 1000 -f -v
(* It took about 30 minutes on my PC.)
$ cd ../lib_files
(modify "bncConfigXML.pm")
---
(line 51)
$bwWebServer = "http(s)://your.server.name.com";
(line 62)
$bwCorpus = "BNC-XML";
(line 114)
$bwSuperuser = 'your_account'; (specify the administrative account)
---
$ sudo mkdir /usr/local/share/bncweb
$ sudo chmod 777 /usr/local/share/bncweb
$ cd ../BNC_encoder
$ sudo perl ../setup/make_MySQL_tables.pl
(When asked for the directory and prefix of the tables, just press [Enter].)
(* It took about 5 minutes on my PC.)
Configure the apache files.
Add the following lines into the appropriate apache config file.
(e.g. just before "</VirtualHost>" in /etc/apache2/sites-available/ssl)
---
Alias /bncweb/ /BNC_XML/BNCweb_version_4.3/
Alias /bncweb /BNC_XML/BNCweb_version_4.3/
ScriptAlias /bncweb-cgi/ /BNC_XML/BNCweb_version_4.3/cgi-bin/
<Directory /BNC_XML/BNCweb_version_4.3>
Options Indexes FollowSymLinks ExecCGI
AuthType Basic
AuthName bncweb
AuthUserFile /etc/bncpass
require valid-user
SetEnv PERL5LIB /BNC_XML/BNCweb_version_4.3/lib_files
</Directory>
---
Restart apache2.
Set the password for each user.
$ sudo htpasswd /etc/bncpass [username]
(Add -c option (htpasswd -c /etc/bncpass [username]) when you add the first user.)
Edit /etc/apparmor.d/usr.sbin.mysqld and add the following line befor the "}" at the end of the file:
---
/usr/local/share/bncweb/* rw,
---
$ sudo /etc/init.d/apparmor restart
$ sudo /etc/init.d/mysql restart
This enables MySQL to write a file to /usr/local/share/bncweb/.
Now access the site: http(s)://hostname/bncweb-cgi/BNCweb.pl
The interface of BNCweb will appear.
2007年7月26日木曜日
How to install BNCweb (CQP-Edition)
Here's how to install the latest version of BNCweb (CQP-Edition) on Ubuntu 7.04.
The following procedure is based on my installation of BNCweb 4.0 beta on Ubuntu 7.04. Please make necessary changes according to the version of BNCweb and to your system environment.
First, install the following packages, if not installed yet.
mysql-server-5.0
libdbi-perl
libdbd-mysl-perl
libhtml-parser-perl
libparse-recdescent-perl
flex
bison
libncurses5-dev
# mkdir /BNC_XML (* or whatever)
(unzip BNCweb-distribution_Beta.zip)
# mv ~/BNCweb-distribution_Beta/BNCweb-distribution_Beta /BNC_XML/
# cd /BNC_XML/BNCweb-distribution_Beta
# chmod -R 755 cgi-bin
# chmod -R 755 lib_files
# mkdir /BNC_XML/CQP-tempXML
# chmod 777 /BNC_XML/CQP-tempXML
# cd CQP_source
# tar xvzf cwb-2.2.b98a-src.tgz
# cd cwb-3.0
(modify "Makefile.inc")
---
line 36
PLATFORM = linux
line 62
SITE = standard
---
# make clean
# make depend
# make all
# make install
# cd ..
# tar xvzf CWB-Perl-Public-1.1.3b.tar.gz
# cd CWB-Perl-Public
# cd CWB
# perl Makefile.PL
# make
# make test
# make install
# cd ../CQP
# perl Makefile.PL
# make
# make install
# cd ../CL
# perl Makefile.PL
# make
# make install
# cd../WebCqp
# perl Makefile.PL
# make
# make install
# mkdir /BNC_XML/Texts
# cd /BNC_XML/Texts
(copy texts.tar.gz on Disk 1 of BNC-XML to /BNC_XML/Texts/)
# tar xvzf texts.tar.gz
# cd ../BNCweb-distribution_Beta/BNCweb-encoder-0.5b
# mkdir /BNC_XML/registry
# perl EncodeBNC.perl -n BNC-XML -r /BNC_XML/registry/ -f -M 800 -v /BNC_XML/Index/ /BNC_XML/Texts/
(* "-M 800" specifies the allocated memory size (in MB).
It took about 5 hours on a PC with Sempron 3200+ and 2GB memory.)
# perl MakeFreqTables.perl -n BNC-XML -r /BNC_XML/registry/ -f -M 800 -v
(* It took about 50 mins on my PC.)
# cd ../lib_files
(modify "bncConfigXML.pm")
---
line 45
$bwCorpusPath = '/BNC_XML/Texts/';
line 49
$bwTempPath = 'BNC_XML/CQP-tempXML';
line 91
$bwMysqlUser = 'root';
comment out line 92
#$bwMysqlUser = 'bncweb';
comment out line 95
#$bwMysqlPwd = 'test';
line 128
$bwSuperuser = 'your_account'; (specify the administrative account)
line 130
$bwDevelopers = 'your_account'; (specify the administrative account)
---
# cd ../BNCweb-encoder-0.5b
# perl make_MySQL_tables.pl
(When asked the username of MySQL admin and its password, just press [Enter]. When asked about the directory of the tables, just press [Enter].)
(* It took about 1.5 hours on my PC.)
Configure the apache files.
Add the following lines into the appropriate apache config file.
(e.g. just before "</VirtualHost>" in /etc/apache2/sites-available/ssl)
---
Alias /bncwebXML/ /BNC_XML/BNCweb-distribution_Beta/
Alias /bncwebXML /BNC_XML/BNCweb-distribution_Beta/
<Directory /BNC_XML/BNCweb-distribution_Beta>
Options Indexes FollowSymLinks ExecCGI
AuthType Basic
AuthName bncweb
AuthUserFile /etc/bncpass
require valid-user
SetEnv PERL5LIB /BNC_XML/BNCweb-distribution_Beta/lib_files
SetEnv CORPUS_REGISTRY /BNC_XML/registry
</Directory>
ScriptAlias /cgi-binbncXML/ /BNC_XML/BNCweb-distribution_Beta/cgi-bin/
---
Restart apache(2).
Set the password for each user.
Now access http(s)://hostname/cgi-binbncXML/BNCquery.pl?theQuery=search&urlTest=yes.
The interface of BNCweb will appear.
The following procedure is based on my installation of BNCweb 4.0 beta on Ubuntu 7.04. Please make necessary changes according to the version of BNCweb and to your system environment.
First, install the following packages, if not installed yet.
mysql-server-5.0
libdbi-perl
libdbd-mysl-perl
libhtml-parser-perl
libparse-recdescent-perl
flex
bison
libncurses5-dev
# mkdir /BNC_XML (* or whatever)
(unzip BNCweb-distribution_Beta.zip)
# mv ~/BNCweb-distribution_Beta/BNCweb-distribution_Beta /BNC_XML/
# cd /BNC_XML/BNCweb-distribution_Beta
# chmod -R 755 cgi-bin
# chmod -R 755 lib_files
# mkdir /BNC_XML/CQP-tempXML
# chmod 777 /BNC_XML/CQP-tempXML
# cd CQP_source
# tar xvzf cwb-2.2.b98a-src.tgz
# cd cwb-3.0
(modify "Makefile.inc")
---
line 36
PLATFORM = linux
line 62
SITE = standard
---
# make clean
# make depend
# make all
# make install
# cd ..
# tar xvzf CWB-Perl-Public-1.1.3b.tar.gz
# cd CWB-Perl-Public
# cd CWB
# perl Makefile.PL
# make
# make test
# make install
# cd ../CQP
# perl Makefile.PL
# make
# make install
# cd ../CL
# perl Makefile.PL
# make
# make install
# cd../WebCqp
# perl Makefile.PL
# make
# make install
# mkdir /BNC_XML/Texts
# cd /BNC_XML/Texts
(copy texts.tar.gz on Disk 1 of BNC-XML to /BNC_XML/Texts/)
# tar xvzf texts.tar.gz
# cd ../BNCweb-distribution_Beta/BNCweb-encoder-0.5b
# mkdir /BNC_XML/registry
# perl EncodeBNC.perl -n BNC-XML -r /BNC_XML/registry/ -f -M 800 -v /BNC_XML/Index/ /BNC_XML/Texts/
(* "-M 800" specifies the allocated memory size (in MB).
It took about 5 hours on a PC with Sempron 3200+ and 2GB memory.)
# perl MakeFreqTables.perl -n BNC-XML -r /BNC_XML/registry/ -f -M 800 -v
(* It took about 50 mins on my PC.)
# cd ../lib_files
(modify "bncConfigXML.pm")
---
line 45
$bwCorpusPath = '/BNC_XML/Texts/';
line 49
$bwTempPath = 'BNC_XML/CQP-tempXML';
line 91
$bwMysqlUser = 'root';
comment out line 92
#$bwMysqlUser = 'bncweb';
comment out line 95
#$bwMysqlPwd = 'test';
line 128
$bwSuperuser = 'your_account'; (specify the administrative account)
line 130
$bwDevelopers = 'your_account'; (specify the administrative account)
---
# cd ../BNCweb-encoder-0.5b
# perl make_MySQL_tables.pl
(When asked the username of MySQL admin and its password, just press [Enter]. When asked about the directory of the tables, just press [Enter].)
(* It took about 1.5 hours on my PC.)
Configure the apache files.
Add the following lines into the appropriate apache config file.
(e.g. just before "</VirtualHost>" in /etc/apache2/sites-available/ssl)
---
Alias /bncwebXML/ /BNC_XML/BNCweb-distribution_Beta/
Alias /bncwebXML /BNC_XML/BNCweb-distribution_Beta/
<Directory /BNC_XML/BNCweb-distribution_Beta>
Options Indexes FollowSymLinks ExecCGI
AuthType Basic
AuthName bncweb
AuthUserFile /etc/bncpass
require valid-user
SetEnv PERL5LIB /BNC_XML/BNCweb-distribution_Beta/lib_files
SetEnv CORPUS_REGISTRY /BNC_XML/registry
</Directory>
ScriptAlias /cgi-binbncXML/ /BNC_XML/BNCweb-distribution_Beta/cgi-bin/
---
Restart apache(2).
Set the password for each user.
Now access http(s)://hostname/cgi-binbncXML/BNCquery.pl?theQuery=search&urlTest=yes.
The interface of BNCweb will appear.
登録:
投稿 (Atom)
