Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blocking bash pipelines #89

Open
chiarcos opened this issue Nov 30, 2023 · 3 comments
Open

blocking bash pipelines #89

chiarcos opened this issue Nov 30, 2023 · 3 comments
Labels

Comments

@chiarcos
Copy link
Contributor

chiarcos commented Nov 30, 2023

This seems to happen in the following pipeline (cf. https://github.com/acoli-repo/germhist, analyses/scrambling/Makefile, slightly modified version of make chlg.tsv: added tee commands)

cat $file | \
# split into columns WORD POS PARSE \
perl -pe 's/^(.*)\(([^\(\) ]+) +([^\(\)]+)\)/\3\t\2\t\1*/;' | \
# convert to CoNLL-RDF with tree extensions \
tee chlg.1.tmp| \
conll-rdf/run.sh CoNLLBrackets2RDF file:`realpath $file`'#' WORD POS PARSE | \
tee chlg.2.ttl| \
# extrapolate edge labels \
conll-rdf/run.sh CoNLLRDFUpdater -custom -updates enhgprep.sparql |\
tee chlg.3.ttl |\
    conll-rdf/run.sh CoNLLRDFFormatter -query enhgquery.sparql | \
    egrep '.' | grep -v '^#' | \
    sed s/'$$'/'\t'$$c'\t'$$h'\t'$$genre'\t'$$region/|\
    tee chlg.tsv
  1. When tracking the progress of the script with ls -l chlg*, it seems that chlg3.ttl remains empty until chlg2.ttl is no longer written into. Maybe, CoNLLBrackets2RDF doesn't produce the right sentence delimiter symbol.
  2. The same thing seems to happen between writing chlg.3.ttl and chlg.tsv (also checked with ls -l *).
@chiarcos
Copy link
Contributor Author

I can confirm that CoNLLRDFUpdater doesn't work in streaming mode. Looking at chldg.3.ttl, I can indeed confirm that this is processed en block, but not streamed: chldg.3.ttl is not grouped by sentences, but has random order from all over the the input sentence data.

@chiarcos chiarcos added the bug label Nov 30, 2023
@chiarcos
Copy link
Contributor Author

I guess this is because the CoNLLBrackets2RDF output uses the "new" SPARQL prefixes, but

if(!buffer.trim().equals("") && (line.startsWith("@") || line.startsWith("#")) && !lastLine.startsWith("@") && !lastLine.startsWith("#")) { //!buffer.matches("@[^\n]*\n?$")) {
only uses the old ones for splitting and namespace spotting.

@chiarcos
Copy link
Contributor Author

so, this is actually the same issue as #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant