[CWB] PHP parse errors in cqpweb from subversion

Richard Eckart de Castilho eckartde at tk.informatik.tu-darmstadt.de
Tue Aug 16 11:23:04 CEST 2011


Hello Andrew,

> The file rface.inc.php isn't actually part of any currently active features, it is something that is still being built, and that I am halfway through writing. So it shouldn't actually be included in any of the files that make up active pages, and errors in it should not affect anything else. So I'm interested to know which page you accessed to get that error!

I already have several corpora in the IMS CWB format. So I went to the page "Install a corpus pre-indexed in CWB" (cqpweb/adm/index.php?thisF=installCorpusIndexed&uT=y) and specified my information there (mysql name, full name, cwb name) and then I click "install corpus with settings above".

I read somewhere that CQPWeb requires that text are marked with <text id="..."> tags. Does the ID have to be numeric? Does it have to be a sequence? Is it ok to use arbitrary additional XML tags?

I put a diff at the end of this mail to show what I had to "fix".

Best,

Richard

-- 
------------------------------------------------------------------- 
Richard Eckart de Castilho
Technical Lead
Ubiquitous Knowledge Processing Lab 
FB 20 Computer Science Department      
Technische Universität Darmstadt 
Hochschulstr. 10, D-64289 Darmstadt, Germany 
phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117
eckartde at tk.informatik.tu-darmstadt.de 
www.ukp.tu-darmstadt.de 
Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de
------------------------------------------------------------------- 


Index: lib/rface.inc.php
===================================================================
--- lib/rface.inc.php   (Revision 257)
+++ lib/rface.inc.php   (Arbeitskopie)
@@ -252,7 +252,7 @@
 
                        $this->debug_alert("RFace: R >> $line\n");
 
-                       if (!empty($this->line_handler_callback)
+                       if (!empty($this->line_handler_callback))
                        {
                                /* call the specified function or class/object method */
                                $callback_return = call_user_func($this->line_handler_callback, $line);
@@ -299,12 +299,12 @@
                                if ( is_object($callback[0]) && is_callable($callback, false, $callback_name) )
                                {
                                        $this->line_handler_callback = $callback;
-                                       $this->debug_alert("RFace: Line handler accepted ( $callback_name, object call ).\n";
+                                       $this->debug_alert("RFace: Line handler accepted ( $callback_name, object call ).\n");
                                }
-                               else if (class_exists($callback[0] && method_exists($callback[0], $callback[1]))
+                               else if (class_exists($callback[0] && method_exists($callback[0], $callback[1])))
                                {
                                        $this->line_handler_callback = $callback;
-                                       $this->debug_alert("RFace: Line handler accepted ( $callback[0]::$callback[1], static call ).\n";
+                                       $this->debug_alert("RFace: Line handler accepted ( $callback[0]::$callback[1], static call ).\n");
                                }
                                else
                                        $this->error("RFace: ERROR: Uncallable object/class method passed as line handler.\n");



More information about the CWB mailing list