-
Notifications
You must be signed in to change notification settings - Fork 0
Trying to make the link between Csniper and CQP #3
Comments
This sounds like tomcat could not find the csniper configuration file. |
I see the log and there are no errors about cqp. I think that my configuration is detected because the configuration of db is working (otherwise the csniper server crash i suppose). |
I modify my docker file in order to use tomcat 6 and I have this warning during deployment phase : (I join my configuration on this comment) |
That is just a warning that you should be able to safely ignore. CSniper tries to load the properties from the classpath in addition of looking for them in its home directory. |
Ok thanks Richard. Can you tell me more about the configuration about cwb and cqp ? Where I can find a test corpus in the csniper format ? |
We do not have a pre-converted corpus at the moment (would be a good idea), but here is a description which describes the conversion process and lists several corpora that have been tested. https://dkpro.github.io/dkpro-csniper/documentation/conversion/ |
It has been a while... Looking at the code, it looks like you get the choice for a given engine only if there is actually a corpus present that was prepared for this engine. Lines 115 to 125 in ae36b3a
|
Ok thank you, I will prepare a corpus ! |
I tried to prepare data using this sample : This is my script : import de.tudarmstadt.ukp.dkpro.core.api.resources.CompressionMethod;
import de.tudarmstadt.ukp.dkpro.core.io.bincas.SerializedCasWriter;
import de.tudarmstadt.ukp.dkpro.core.io.imscwb.ImsCwbWriter;
import de.tudarmstadt.ukp.dkpro.core.io.negra.NegraExportReader;
import org.apache.uima.UIMAException;
import org.apache.uima.fit.pipeline.SimplePipeline;
import java.io.IOException;
import static org.apache.uima.fit.factory.AnalysisEngineFactory.createPrimitiveDescription;
import static org.apache.uima.fit.factory.CollectionReaderFactory.createDescription;
public class Converter {
public static void main(String[] args) throws UIMAException, IOException {
// Collection ID
String id = args[0];
// Source file (e.g. tuebadz-5.0.anaphora.export.bz2)
String source = args[1];
// Target folder
String target = args[2];
SimplePipeline.runPipeline(
createDescription(NegraExportReader.class,
NegraExportReader.PARAM_SOURCE_LOCATION, source,
NegraExportReader.PARAM_COLLECTION_ID, id,
NegraExportReader.PARAM_LANGUAGE, "de",
NegraExportReader.PARAM_ENCODING, "ISO-8859-15",
NegraExportReader.PARAM_READ_PENN_TREE, true),
createPrimitiveDescription(SerializedCasWriter.class,
SerializedCasWriter.PARAM_TARGET_LOCATION, target + "/bin",
SerializedCasWriter.PARAM_USE_DOCUMENT_ID, true,
SerializedCasWriter.PARAM_COMPRESSION, CompressionMethod.XZ),
createPrimitiveDescription(ImsCwbWriter.class,
ImsCwbWriter.PARAM_TARGET_ENCODING, "UTF-8",
ImsCwbWriter.PARAM_TARGET_LOCATION, target + "/cqp/",
ImsCwbWriter.PARAM_WRITE_TEXT_TAG, true,
ImsCwbWriter.PARAM_WRITE_DOCUMENT_TAG, true,
ImsCwbWriter.PARAM_WRITE_OFFSETS, true,
ImsCwbWriter.PARAM_WRITE_LEMMA, true,
ImsCwbWriter.PARAM_WRITE_DOC_ID, false));
}
} I used gradle to resolve dependencies. But I have some problem, I obtain two files after excute my jar : (I attach to my post the output tree Can you tell me more about the input format ? |
What ImsCwbWriter produces here is the input format used for the cwb tools [1]. The easier alternative (which is not documented on the csniper website, only in the code... mea culpa) is to specify the directory in which the cwb-tools ( [1] http://cwb.sourceforge.net/files/CWB_Encoding_Tutorial/node3.html |
I try to install CSniper everything until the CQP installation
I download cwb and I install it with the command :
./install-cwb.sh
I modify the properties of CSniper, I add this line :
engine.cqp.executable=path/to/cqp/file
I start tomcat and I reached the website succesfully but I cannot select the cqp engine. I have no log of this, I think this is the mistake of me. Anyone have an idea ?
Thanks in advance
The text was updated successfully, but these errors were encountered: