ELTE-DH / NoSketch-Engine-Docker

A NoSketch Engine Docker image which is easy to use
GNU Lesser General Public License v3.0
16 stars 9 forks source link

problem running `corpquery` by `make execute` #10

Closed sassbalint closed 2 years ago

sassbalint commented 2 years ago

First do: git clone + make compile + make run.

Connecting to the docker, corpquery works fine:

$ make connect
# corpquery /corpora/registry/susanne '[word="This"]' | head -1
#379 's handling of federal funds granted for child welfare services in foster homes . " < This > is one of the major items in the Fulton County general assistance program " ,

But if i try the same by make execute it fails:

$ make execute CMD="corpquery /corpora/registry/susanne '[word=\"This\"]'"
docker run --rm -it --mount type=bind,src=$(pwd)/corpora,dst=/corpora -e FORCE_RECOMPILE="" \
     -e SERVER_NAME="https://sketchengine.company.com/" -e SERVER_ALIAS="sketchengine.company.com" -e CITATION_LINK="https://github.com/elte-dh/NoSketch-Engine-Docker" \
     eltedh/nosketch-engine:latest "corpquery /corpora/registry/susanne '[word="This"]'"
[...]
RuntimeError: unexpected character ' at position 2

I guess there is some flaw with quotation marks, but I was not able to find it out exactly what.

update: in 15e66ec it works!

dlazesz commented 2 years ago

Tested and works with 70d31cacac93c1957fc8447f7baa34b21e4fd19c:

make execute CMD='corpquery /corpora/registry/susanne "[word=\"This\"]"'

Note the difference in quotations. The outermost must be single, the middle one must be double, while the innermost quotation marks must be escaped.