lifan0127 / ai-research-assistant

Aria is Your AI Research Assistant Powered by GPT Large Language Models
GNU Affero General Public License v3.0
794 stars 33 forks source link

Umlauts are misrepresented in output. #68

Open jmiba opened 6 months ago

jmiba commented 6 months ago

German umlauts will be not properly encoded in the output. This is an example copied from the chat output window (but have a look at the reference below where umlauts are correct):

Die "Urheberrechtsfibel - nicht nur f\u00fcr Piraten" von Klaus Graf ist eine kritische Auseinandersetzung mit und Erl\u00e4uterung des deutschen Urheberrechtsgesetzes. Sie richtet sich nicht nur an Mitglieder der Piratenpartei, sondern an ein breites Publikum. Das Buch erl\u00e4utert den Gesetzestext und bietet Interpretationen sowie kritische Perspektiven zu den verschiedenen Paragraphen und Bestimmungen des Urheberrechtsgesetzes. Es behandelt die Komplexit\u00e4t und Feinheiten des Urheberrechts und macht es auch f\u00fcr Laien ohne juristischen Hintergrund verst\u00e4ndlich. Der Autor beleuchtet, wie das Gesetz die Sch\u00f6pfer und Nutzer urheberrechtlich gesch\u00fctzter Werke betrifft und diskutiert das Gleichgewicht zwischen dem Schutz der Rechte von Autoren und dem \u00f6ffentlichen Interesse am Zugang zu Informationen. Die Kommentierung greift auch Debatten und Kontroversen um das Urheberrecht auf, wie die Doktrin der angemessenen Verwendung (Fair Use), die Durchsetzung von Urheberrechten und die Auswirkungen der digitalen Technologie auf die Urheberrechtspraktiken. Insgesamt dient das Buch als Bildungsressource, die den juristischen Fachjargon entmystifiziert und ein besseres Verst\u00e4ndnis der Urheberrechtsprinzipien und ihrer Auswirkungen im digitalen Zeitalter f\u00f6rdert.

References

(1) Graf, K. Urheberrechtsfibel - Nicht Nur Für Piraten: Der Text Des Deutschen Urheberrechtsgesetzes, Erklärt Und Kritisch Kommentiert ; (PiratK-UrhG), 1. Aufl.; Reihe Netzbürger; Contumax-Verl.: Berlin, 2009.

lifan0127 commented 6 months ago

@jmiba Thanks for the feedback. I will look into it.

Just to confirm, are the umlauts displayed correctly within your main Zotero window?

Also, is your Zotero locale setting German or English?

jmiba commented 6 months ago

Zotero is set to German and the umlauts are displayed correctly elsewhere. It is just in the bot-generated answers in the aria window that the umlaut characters are scrambled. Citations and lists of documents from my library are fine.

lifan0127 commented 6 months ago

Hi @jmiba , sorry I am not able to reproduce this issue on my computer (Ubuntu). Below is my procedure:

  1. Import this article into Zotero via the Chrome extension: https://www.ssoar.info/ssoar/handle/document/6316
  2. Change my Zotero language to Deutsch.
  3. Ask Aria to summarize the article.

I am not certain about the reason but I suspect it has something to do with the system encoding. In your example, the German umlauts are represented as Unicode encoding (ex. \u00fc for ü). What is your operating system and the encoding it uses?

image

jmiba commented 6 months ago

Hi @lifan0127 , maybe i's a general API problem, cf. https://stackoverflow.com/questions/57658510/german-umlaut-in-python-json-body-request.

I don't seem to have the problem on another machine running Windows 10. On my Windows 11 machine, however, after asking the Bot for correct UTF8 encoding, I get a different, but, alas, also wrong (LaTeX-like) representation of umlauts and German ß:

image

lifan0127 commented 6 months ago

Hi @jmiba thanks for your additional tests and the reference. If you are consistently seeing this issue on one computer but not on others, it may be related to some specific setting of the computer. I will do more tests on my end hopefully to reproduce this issue.