rycolab / aclpub2

MIT License
29 stars 39 forks source link

escaping of names #74

Closed esalesky closed 2 years ago

esalesky commented 2 years ago

How should names be escaped to build, and in which files does this need to be done? I had previously built my proceedings without escaping names in .yml files; I didn't change the yml file but now have a breaking error as some values are saved as None

  File "IWSLT/aclpub2/aclpub2/generate.py", line 528, in normalize_latex_string
    return text.replace("’", "'").replace("&", "\\&").replace("_", "\\_")
AttributeError: 'NoneType' object has no attribute 'replace'

Should we be using hex codes like institution: "Universit\xE4t Potsdam", and is this needed in all yml files?

esalesky commented 2 years ago

Closing; this was my error, there was in fact an empty field in one of my yml files which didn't previously cause the build to break but now does (which is a good thing! though it was a bit hard to track down from the error thrown)

If anyone stumbles on this wondering about escaping in the future, either of the following does build successfully — either including characters with diacritics raw like institution: Universität or putting the value in quotation marks with hex values like institution: "Universit\xE4t"

crux82 commented 2 years ago

Unfortunately one of the entries of your program_committee file was "ill-formed": the institution was None.

I updated the software to improve the warning.

Thank you for the suggestion

crux82 commented 2 years ago

And thank you for confirming that special characters are correctly shown.