You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FoLiA-correct fails with text consistency error #45
So the web service does not return any other output files than error.log. As a consequence we cannot check what the FoLiA error reported is. We could check that in the version run on the command line. That might finally tell us sth.
The fastest way to pinpoint the problem is to take FoLiA-correct in isolation and run it with the same input files as in the pipeline.
If you dare, you could also add '-v -v -v -v' tot the FoLiA-correct command to get a lot of output.
Reproducing/inspecting the issue (outside of the production environment) is indeed not the problem and the FoLiA error is clear, it's just a matter of tracking it down and solving it. The main underlying issue remains that there's no official maintainer anymore for the ticcl stuff (but foliautils is technically in my jurisdiction now so I'll take a look)
Seeing that the PICCL website does not leave any output files other than error.log, even when one requests debugging info, I have tried other approaches.
Now, after other abortive tests with the PICCL webservice currently at Radboud I have used 'pdftotext' to extract the text from this pdf.
In the webservice FoLiA-stats reported that the FoLiA created by txt2folia was invalid due an invalid character 12.
The FoLiA file created by command line C++ tool FoLiA-txt from this text file likewise fails validation:
reynaert@violet:/reddata/PICCL$ /exp/sloot/usr/local/bin/folialint mwsel.folia.xml
mwsel.folia.xml:814: XML-error: PCDATA invalid Char value 12
Both tools fail to create valid FoLiA on the basis of this test file. This is an unsavoury situation.
Seeing that the PICCL website does not leave any output files other than error.log, even when one requests debugging info.
The only thing that debug option does is not automatically clean up all the intermediate files, leaving them open to inspection if you have access to the server; it was implemented on your request a while ago. Note that the production server is never intended for deep debugging anyway, problems should be reproduced, analysed, and hopefully fixed in a local development environment.
proycon, unless I am very mistaken, txt2folia is very much in your province and hence jurisdiction.
Yes, definitely. FoLiA-txt too now. Both should indeed never produce invalid FoLiA, so that's a clear bug. Let's make new issues for that, as it's not directly related to the one in this topic. I reproduced it and already have a clue where it goes wrong (odd control characters in the pdftotext output).
Point is, proycon, the intermediate files do seem to have been cleaned up.
No, I meant that the entire work/ directory containing all of nextflow's work is left intact with that option on (by default it would be deleted immediately after a run). Most intermediate files are indeed not made available through the webservice (some are though, irregardless of the debug option, by your request a while back, I'll add the pdf2text result although I'm a bit wary of clutter or confusion for the user if there's a lot of output)
O, I can reproduce this. It seems a problem in the HEMP detection. The • in •a is seen as the possible start of an HEMP
But then the procedure to resolve HEMP's is running havoc somewhere.
This needs more investigation.
The ranked file primarily shows TICCL should not be run on very short texts and particularly not when it is not given a very comprehensive lexicon and name list for the language involved. Also very obvious is that the Aspell lexicon it had available for this run only has lemmata. Other word forms have mainly been lemmatized here.
This test file is a curious mix of German and Latin. For this a bilingual background lexicon would be called for.
It seems it somehow normalizes double 's' in TICCL-unk (look there for 'ss') only to correct 'ss' into the Eszett (Dutch: Ringl-s) later. Right now I have no good idea why it normalizes that.
Another thing that has struck me during these tests is that PICCL does not yet allow for bi- or trigram correction. The parameter for that is in the FoLiA-stats command in ticcl.nf but if I am not mistaken, the interface does not yet allow for setting 'max' to 3 for trigram correction. By rights, this is another issue to be sure.
interestingly, FoLiA-correct doesn't have a --hemp parameter at all. :)
It uses the found HEMPS's from the puncts file, I assume.
But indeed it tries to detect hemps all the time.
Ok. FoLiA-correct uses the same algorithm as TICCL-unk to detect HEMPS. When one is found, it is checked in the PUNCT file.
When present the HEMP is resolved. Otherwise it is ignored.
There was a small error in the ignoring step, which caused a one-off error, which is corrected now.
@martinreynaert '•a' is NOT to included in the punct file by TICCL-unk while the de-punctuated 'a' is too short.
Nice that this is fixed!
Final remark: When a HEMP is 'resolved' it is simply done by attaching the resolved text to one of the input string/word nodes.
This should ideally be done by creating a real FoLiA correction.
I will add this as a separate issue.
Activity
martinreynaert commentedon Sep 10, 2020
So the web service does not return any other output files than error.log. As a consequence we cannot check what the FoLiA error reported is. We could check that in the version run on the command line. That might finally tell us sth.
kosloot commentedon Sep 10, 2020
The fastest way to pinpoint the problem is to take FoLiA-correct in isolation and run it with the same input files as in the pipeline.
If you dare, you could also add '-v -v -v -v' tot the FoLiA-correct command to get a lot of output.
kosloot commentedon Sep 10, 2020
NOTE: This issue should be transferred to https://github.com/LanguageMachines/foliautils
proycon commentedon Sep 10, 2020
Ah, right, I confuse ticcltools and foliautils sometimes... moving it..
proycon commentedon Sep 10, 2020
Reproducing/inspecting the issue (outside of the production environment) is indeed not the problem and the FoLiA error is clear, it's just a matter of tracking it down and solving it. The main underlying issue remains that there's no official maintainer anymore for the ticcl stuff (but foliautils is technically in my jurisdiction now so I'll take a look)
proycon commentedon Sep 10, 2020
@kosloot Thanks for the verbosity tip, that helped get some more output (level 4):
I don't get why it reports the same str ID for the last two items, seems wrong?
martinreynaert commentedon Sep 10, 2020
Seeing that the PICCL website does not leave any output files other than error.log, even when one requests debugging info, I have tried other approaches.
Now, after other abortive tests with the PICCL webservice currently at Radboud I have used 'pdftotext' to extract the text from this pdf.
In the webservice FoLiA-stats reported that the FoLiA created by txt2folia was invalid due an invalid character 12.
The FoLiA file created by command line C++ tool FoLiA-txt from this text file likewise fails validation:
reynaert@violet:/reddata/PICCL$ /exp/sloot/usr/local/bin/folialint mwsel.folia.xml
mwsel.folia.xml:814: XML-error: PCDATA invalid Char value 12
Both tools fail to create valid FoLiA on the basis of this test file. This is an unsavoury situation.
martinreynaert commentedon Sep 10, 2020
proycon, unless I am very mistaken, txt2folia is very much in your province and hence jurisdiction.
proycon commentedon Sep 10, 2020
The only thing that debug option does is not automatically clean up all the intermediate files, leaving them open to inspection if you have access to the server; it was implemented on your request a while ago. Note that the production server is never intended for deep debugging anyway, problems should be reproduced, analysed, and hopefully fixed in a local development environment.
Yes, definitely. FoLiA-txt too now. Both should indeed never produce invalid FoLiA, so that's a clear bug. Let's make new issues for that, as it's not directly related to the one in this topic. I reproduced it and already have a clue where it goes wrong (odd control characters in the pdftotext output).
martinreynaert commentedon Sep 10, 2020
Point is, proycon, the intermediate files do seem to have been cleaned up. There should at least have been the *txt file derived from the PDF.
Characters that are not allowed in XML should be filtered out by the tool that creates the XML.
Thanks!
proycon commentedon Sep 10, 2020
No, I meant that the entire work/ directory containing all of nextflow's work is left intact with that option on (by default it would be deleted immediately after a run). Most intermediate files are indeed not made available through the webservice (some are though, irregardless of the debug option, by your request a while back, I'll add the pdf2text result although I'm a bit wary of clutter or confusion for the user if there's a lot of output)
proycon commentedon Sep 10, 2020
Yes, solved for txt2folia now (proycon/foliatools#14), still looking into FoLiA-txt.
kosloot commentedon Sep 12, 2020
So is this problem gone now after the fixes in libfolia?
proycon commentedon Sep 12, 2020
No! Only the side-issue @martinreynaert found and mentioned in this thread was solved, it did not affect this issue so it is still very much open.
kosloot commentedon Sep 13, 2020
So, my offer to analyze this still stands. Please provide me with ALL input files of the FoLiA-correct run.
proycon commentedon Sep 13, 2020
That would be great! Here are all the input files: https://lst.science.ru.nl/~proycon/8d4c3775cda1b0d0a2455f9e64bd7f.tar.gz
Run as:
kosloot commentedon Sep 13, 2020
O, I can reproduce this. It seems a problem in the HEMP detection. The
•in•ais seen as the possible start of an HEMPBut then the procedure to resolve HEMP's is running havoc somewhere.
This needs more investigation.
martinreynaert commentedon Sep 13, 2020
The ranked file primarily shows TICCL should not be run on very short texts and particularly not when it is not given a very comprehensive lexicon and name list for the language involved. Also very obvious is that the Aspell lexicon it had available for this run only has lemmata. Other word forms have mainly been lemmatized here.
This test file is a curious mix of German and Latin. For this a bilingual background lexicon would be called for.
It seems it somehow normalizes double 's' in TICCL-unk (look there for 'ss') only to correct 'ss' into the Eszett (Dutch: Ringl-s) later. Right now I have no good idea why it normalizes that.
martinreynaert commentedon Sep 13, 2020
So HEMP detection is in the way even if no -hemp parameter was ever set?
martinreynaert commentedon Sep 13, 2020
Another thing that has struck me during these tests is that PICCL does not yet allow for bi- or trigram correction. The parameter for that is in the FoLiA-stats command in ticcl.nf but if I am not mistaken, the interface does not yet allow for setting 'max' to 3 for trigram correction. By rights, this is another issue to be sure.
kosloot commentedon Sep 13, 2020
interestingly, FoLiA-correct doesn't have a --hemp parameter at all. :)
It uses the found HEMPS's from the puncts file, I assume.
But indeed it tries to detect hemps all the time.
Needs more investigation....
martinreynaert commentedon Sep 13, 2020
If I remember correctly it indeed uses the HEMPs from the puncts file.
martinreynaert commentedon Sep 13, 2020
Does not TICCL-unk normalize '•a' to 'a' ? I seem to remember we have discussed this before.
kosloot commentedon Sep 14, 2020
Ok. FoLiA-correct uses the same algorithm as TICCL-unk to detect HEMPS. When one is found, it is checked in the PUNCT file.
When present the HEMP is resolved. Otherwise it is ignored.
There was a small error in the ignoring step, which caused a one-off error, which is corrected now.
@martinreynaert '•a' is NOT to included in the punct file by TICCL-unk while the de-punctuated 'a' is too short.
proycon commentedon Sep 15, 2020
Confirmed, is fixed! Guess we should do a release now.
kosloot commentedon Sep 15, 2020
Nice that this is fixed!
Final remark: When a HEMP is 'resolved' it is simply done by attaching the resolved text to one of the input string/word nodes.
This should ideally be done by creating a real FoLiA correction.
I will add this as a separate issue.