pombreda / amcat

Automatically exported from code.google.com/p/amcat
0 stars 0 forks source link

apa rtf uploader doet het niet - nu met testsetje artikelen #477

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. artikelsetje uit APA prof database uploaden met APA prof uploader
2.
3.

What is the expected output? What do you see instead?
expected: successfully uploaded 29 article(s)!
instead: successfully uploaded 0 article(s)!

What version of the product are you using? On what operating system?
3.2.1 (production-labs), chrome 

Please provide any additional information below.
Volgens mij is de opmaak van de output iets veranderd tov het testsetje van 
begin dit jaar en werkt het daarom niet. Zie attachment voor testsetje 
(ongeopend, direct uit APA database, 1 artikel per medium) en attachment 2 voor 
een screenshot van het scherm van de APA databank waarin je het downloadformat 
kunt specificeren. 

Original issue reported on code.google.com by carinaja...@nieuwsmonitor.net on 4 Jun 2013 at 7:22

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by carinaja...@nieuwsmonitor.net on 4 Jun 2013 at 7:23

GoogleCodeExporter commented 9 years ago
Kan dit een goede eerste case zijn voor de aan te nemen programmeur, of heeft 
het meer haast?

Original comment by vanatteveldt@gmail.com on 4 Jun 2013 at 7:33

GoogleCodeExporter commented 9 years ago
Ik gebruik een extern tool om de rtf om te zetten naar een xml bestand. Die 
klaagt dat de rtf niet in ascii staat, wat inderdaad zo is 

'ascii' codec can't decode byte 0xfc in position 15: ordinal not in 
range(128)Invalid RTF: File not ascii encoded.

>>> x = open("/home/wva/Downloads/Meldungsliste(29).rtf").read()
>>> x[600:610]
'z S\xfcd\\plai'

Dus het bestand heeft byte FC op de 604e plek staat, in latin-1 is dat een 
u-umlaut (volgens mij is het ressort Graz Sued)

Volgens wikipedia is RTF inderdaad een ASCII standaard, dus het bestand is 
gewoon geen rtf.

Weet je 100% zeker dat dit het bestand is zoals het van defacto komt, en het 
niet is geopend in word o.i.d.?

Ik zet hem nu op invalid, heropen even als je zeker weet dat het een echt 
defacto bestand is, dan gaan we een list verzinnen.

Original comment by vanatteveldt@gmail.com on 5 Jul 2013 at 10:08

GoogleCodeExporter commented 9 years ago
ja, dit was het bestand zoals het uit de professional database kwam (defacto is 
van de html, professional van de rtf). Ik heb dit bestand niet eerst geopend, 
gewoon opgeslagen vanuit apa professional en direct als attachment hier 
toegevoegd. 

Original comment by carinaja...@nieuwsmonitor.net on 5 Jul 2013 at 10:17

Attachments:

GoogleCodeExporter commented 9 years ago
Dit valt nog helemaal niet mee. De unicode error is zoals ik dacht goed op te 
lossen door het document te preprocessen en ofwel de umlauts te strippen ofwel 
ze op correcte wijze te coderen. 

Echter, de rtf ziet er compleet anders uit dan de eerdere, kijk maar eens naar 
de bestanden. De eerdere bestanden hadden nieuwe documenten op een nieuwe 
regel, deze scheiden met een soort lijn. De eerdere bestanden hadden elke keer 
een tabelletje met de aard van het document (ORF Transkripte etc) en de datum, 
gevolgd door de dateline. De nieuwe documenten openen met de dateline.

Het blijft helaas niet bij deze verschillen: ik gebruikte font-eigenschappen om 
headline etc eruit te halen (omdat je anders niet kan zien wat kop is en wat 
artikel), maar die font-eigenschappen zijn ook weer anders.

Ik kan prima de uploader aanpassen zodat hij deze twee formats redelijk aankan, 
maar ik begrijp eigenlijk gewoon niet hoe 1 bron zulke verschillende documenten 
op kan leveren, terwijl de bron hetzelfde is (in zowel dit bestand als het 
eerdere Artikel20130315_17.rtf zit bv de Kleine Zeitung), en ik ben bang dat 
elke nieuwe aanpassing die ik maak zonder dat ik begrijp wat er echt aan de 
hand is de uploader alleen maar complexer maakt en de kans op latere fouten 
vergroot.

Hoe kunnen deze format-discrepanties ontstaan? Snappen jullie hier iets van? 
Zijn er iets van instellingen, of verschillen tussen databestanden ofzo?

Original comment by vanatteveldt@gmail.com on 22 Jul 2013 at 10:11

GoogleCodeExporter commented 9 years ago
3
[10:23:19 AM] Wouter  van Atteveldt: Hey Katherina
[10:23:35 AM] Wouter  van Atteveldt: Do you have a minute today to discuss the 
APA situation?
[10:25:53 AM] koenigstiger7: Yes. I think the problem may be that I downloaded 
the early test files from my husband's account which I had been told is the 
same as the APA Professional one.
[10:27:05 AM] Wouter  van Atteveldt: So, you think the new file is the format 
that the files in August will be as well?
[10:28:20 AM] koenigstiger7: Yes, it should be the format of the new file. But 
I'll check with APA to make sure that they have no plans for changing their 
database in the summer months.
[10:32:04 AM] Wouter  van Atteveldt: ok. I think the new file only has 
newspaper data, right? Will you also be using the ORF and other transcripts  in 
the summer?
[10:32:45 AM] Wouter  van Atteveldt: because in that case I would like to ask 
you to also download a couple of these transcripts (10 or so should be enough, 
I understand that you pay per article) so I can make sure that these work as 
well in the new format
[10:33:00 AM] Wouter  van Atteveldt: finally, I guess this means that the 
script no longer needs to be able to process the old files?
[10:35:08 AM] koenigstiger7: Okay, I'll ask APA for a pre-download and get 
those tv transcripts to you as soon as possible. And yes, the script no longer 
needs to process the old files. Sorry about that, but at least it provided us 
with lots of test data to play with
[10:36:52 AM] Wouter  van Atteveldt: OK. If you get these files to me today I 
can make sure that they work before I go on holiday, I will make sure that the 
new newspaper format works in any case. I will also make sure that Martijn 
knows about the code so het can solve any possible issues.

Original comment by vanatteveldt@gmail.com on 23 Jul 2013 at 7:39

GoogleCodeExporter commented 9 years ago
zie bijlagen voor testsetjes

Original comment by carinaja...@nieuwsmonitor.net on 23 Jul 2013 at 1:31

Attachments:

GoogleCodeExporter commented 9 years ago
Created a new issue since we are creating a new uploader, not fixing the 
existing one (which works fine on the older rtf files).

Original comment by vanatteveldt@gmail.com on 23 Jul 2013 at 1:34