responsible-ai-collaborative / aiid

The AI Incident Database seeks to identify, define, and catalog artificial intelligence incidents.
https://incidentdatabase.ai
Other
170 stars 35 forks source link

Generate Markdown in Reports #519

Closed smcgregor closed 2 years ago

smcgregor commented 2 years ago

When you use the fetch endpoint for parsing news articles, the returned text is a single big block of text.

cesarvarela commented 2 years ago

Any example?

This one for example seems to work ok:

https://arstechnica.com/cars/2022/04/cops-take-dim-view-of-autonomous-vehicle-driving-with-no-lights-at-night/

Returns:

Enlarge / Cruise's driverless Bolt EVs are a common sight in San Francisco.      A video showing a driverless car being stopped by the police and then attempting to drive away went viral over the weekend. San Francisco police stopped one of Cruise's autonomous Chevrolet Bolt EVs, likely because the car's headlights were not on despite it being night. In the video, first posted to Instagram on April 2, an officer can be heard saying, "There's nobody in it."
But a few seconds later, after the officer walks back to his police car, the autonomous vehicle—perhaps deciding that the traffic stop was over—tries to drive away before pulling over to a stop a few hundred feet away.
Cruise says that the car wasn't trying to make a run for it. The vehicle first yielded to the police vehicle, then pulled over to a safe spot for the actual traffic stop, the company says. One of the police officers contacted Cruise to inform it of the situation, and the driverless car did not receive a ticket. Cruise says it has fixed whatever caused the car to drive without its headlights at night.  Advertisement   This is not the first time that a driverless car has been stopped by the police. Way back in 2015, when it was still just the Google Self-Driving Car Project and not Waymo, a Google self-driving car was stopped in Mountain View, California, for going just 24 mph (39 km/h) in a 35 mph (56 km/h) zone. On that occasion, no ticket was issued, as the officer decided that no law had been broken.
In 2019, a police officer in Providence, Rhode Island, pulled over one of May Mobility's low-speed autonomous shuttles. The six-person shuttles run a 12-stop urban loop to and from a train station, but on the first day of operations, one was stopped by an officer who was unfamiliar with the vehicle. No charges resulted from that interaction, either.
Also in 2019, a driverless Tesla was stopped after its owner used the car's remote summon feature in Florida. However, in that case, the incident was staged by a YouTuber.
Autonomous vehicle developers like Cruise and Waymo have prepared guides for first responders on how to interact with the vehicles in case of emergencies.

Unless a newline is expected between those paragraphs?

smcgregor commented 2 years ago

It needs a newline between paragraphs to make it readable.

cesarvarela commented 2 years ago

woot, that looked differently before submitting the comment.

cesarvarela commented 2 years ago

The library we are using has a markdown option that extracts the article content as markdown:

![Cruise's driverless Bolt EVs are a common sight in San Francisco.](https://cdn.arstechnica.net/wp-content/uploads/2022/04/Cruise-car-in-Hayes-Valley-San-Francisco-800x450.jpg)

[Enlarge](https://cdn.arstechnica.net/wp-content/uploads/2022/04/Cruise-car-in-Hayes-Valley-San-Francisco.jpg) / Cruise's driverless Bolt EVs are a common sight in San Francisco.

A video showing a driverless car being stopped by the police and then attempting to drive away went viral over the weekend. San Francisco police stopped one of Cruise's autonomous Chevrolet Bolt EVs, likely because the car's headlights were not on despite it being night. In the video, [first posted to Instagram on April 2](https://www.instagram.com/tv/Cb1q-vggFn9/), an officer can be heard saying, "There's nobody in it."

But a few seconds later, after the officer walks back to his police car, the autonomous vehicle—perhaps deciding that the traffic stop was over—tries to drive away before pulling over to a stop a few hundred feet away.

Cruise says that the car wasn't trying to make a run for it. The vehicle first yielded to the police vehicle, then pulled over to a safe spot for the actual traffic stop, the company says. One of the police officers contacted Cruise to inform it of the situation, and the driverless car did not receive a ticket. Cruise says it has fixed whatever caused the car to drive without its headlights at night.

Advertisement

This is not the first time that a driverless car has been stopped by the police. [Way back in 2015](https://www.cnn.com/2015/11/13/us/google-self-driving-car-pulled-over/index.html), when it was still just the Google Self-Driving Car Project and not Waymo, a Google self-driving car was stopped in Mountain View, California, for going just 24 mph (39 km/h) in a 35 mph (56 km/h) zone. On that occasion, no ticket was issued, as the officer decided that no law had been broken.

In 2019, a police officer in Providence, Rhode Island, [pulled over one of May Mobility's low-speed autonomous shuttles](https://www.usatoday.com/story/money/cars/2019/05/15/police-officer-pulls-over-self-driving-shuttle/3686826002/). The six-person shuttles run a 12-stop urban loop to and from a train station, but on the first day of operations, one was stopped by an officer who was unfamiliar with the vehicle. No charges resulted from that interaction, either.

Also in 2019, a driverless Tesla was stopped after its owner used the car's remote summon feature in Florida. However, in that case, [the incident was staged by a YouTuber](https://insideevs.com/news/374673/confirmed-police-smart-summon-staged/).

Autonomous vehicle developers like [Cruise](https://www.youtube.com/watch?v=ZM3kfauMgZY&t=593s) and [Waymo](https://www.washingtonpost.com/technology/2018/10/24/heres-what-happens-when-police-pull-over-driverless-car/) have prepared guides for first responders on how to interact with the vehicles in case of emergencies.

Does a much better job with new lines, and would allow for richer formatting, but users would have to remove unwanted links and/or images.

smcgregor commented 2 years ago

There is no parameter to scrub the hotlinked images? Otherwise this sounds great.

On Mon, Apr 11, 2022, 11:19 AM Cesar Varela @.***> wrote:

The library we are using has a markdown option that extracts the article content as markdown:

Cruise's driverless Bolt EVs are a common sight in San Francisco.

Enlarge / Cruise's driverless Bolt EVs are a common sight in San Francisco.

A video showing a driverless car being stopped by the police and then attempting to drive away went viral over the weekend. San Francisco police stopped one of Cruise's autonomous Chevrolet Bolt EVs, likely because the car's headlights were not on despite it being night. In the video, first posted to Instagram on April 2, an officer can be heard saying, "There's nobody in it."

But a few seconds later, after the officer walks back to his police car, the autonomous vehicle—perhaps deciding that the traffic stop was over—tries to drive away before pulling over to a stop a few hundred feet away.

Cruise says that the car wasn't trying to make a run for it. The vehicle first yielded to the police vehicle, then pulled over to a safe spot for the actual traffic stop, the company says. One of the police officers contacted Cruise to inform it of the situation, and the driverless car did not receive a ticket. Cruise says it has fixed whatever caused the car to drive without its headlights at night.

Advertisement

This is not the first time that a driverless car has been stopped by the police. Way back in 2015, when it was still just the Google Self-Driving Car Project and not Waymo, a Google self-driving car was stopped in Mountain View, California, for going just 24 mph (39 km/h) in a 35 mph (56 km/h) zone. On that occasion, no ticket was issued, as the officer decided that no law had been broken.

In 2019, a police officer in Providence, Rhode Island, pulled over one of May Mobility's low-speed autonomous shuttles. The six-person shuttles run a 12-stop urban loop to and from a train station, but on the first day of operations, one was stopped by an officer who was unfamiliar with the vehicle. No charges resulted from that interaction, either.

Also in 2019, a driverless Tesla was stopped after its owner used the car's remote summon feature in Florida. However, in that case, the incident was staged by a YouTuber.

Autonomous vehicle developers like Cruise and Waymo have prepared guides for first responders on how to interact with the vehicles in case of emergencies.

Does a much better job with new lines, and would allow for richer formatting, but users would have to remove unwanted links and/or images.

— Reply to this email directly, view it on GitHub https://github.com/responsible-ai-collaborative/aiid/issues/519#issuecomment-1095394003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAP2DDRSTW7UIBIUFG5CJLVERUJVANCNFSM5SCMPYIA . You are receiving this because you authored the thread.Message ID: @.***>

cesarvarela commented 2 years ago

After a few tests, I couldn't find any outstanding issue with markdown translations (to Spanish). For example, the translation of the text above handles links very well:

![Los Bolt EV sin conductor de Cruise son algo común en San Francisco.](https://cdn.arstechnica.net/wp-content/uploads/2022/04/Cruise-car-in-Hayes-Valley-San-Francisco- 800x450.jpg)

[Agrandar](https://cdn.arstechnica.net/wp-content/uploads/2022/04/Cruise-car-in-Hayes-Valley-San-Francisco.jpg) / Los Bolt EV sin conductor de Cruise son una vista común en San Francisco.

Un video que muestra cómo la policía detiene un automóvil sin conductor y luego intenta alejarse se volvió viral durante el fin de semana. La policía de San Francisco detuvo uno de los Chevrolet Bolt EV autónomos de Cruise, probablemente porque los faros del automóvil no estaban encendidos a pesar de que era de noche. En el video, [publicado por primera vez en Instagram el 2 de abril](https://www.instagram.com/tv/Cb1q-vggFn9/), se puede escuchar a un oficial decir: "No hay nadie".

Pero unos segundos más tarde, después de que el oficial regresa a su coche de policía, el vehículo autónomo, quizás decidiendo que la parada de tráfico había terminado, intenta alejarse antes de detenerse a unos cientos de pies de distancia.

Cruise dice que el auto no estaba tratando de huir. El vehículo primero cedió el paso al vehículo policial, luego se detuvo en un lugar seguro para la parada de tráfico real, dice la compañía. Uno de los policías se puso en contacto con Cruise para informarle de la situación y el coche sin conductor no recibió ninguna multa. Cruise dice que arregló lo que sea que causó que el automóvil condujera sin las luces delanteras durante la noche.

Anuncio publicitario

Esta no es la primera vez que la policía detiene un automóvil sin conductor. [Allá por 2015](https://www.cnn.com/2015/11/13/us/google-self-driving-car-pulled-over/index.html), cuando todavía era solo Google Self -Driving Car Project y no Waymo, un automóvil autónomo de Google fue detenido en Mountain View, California, por ir a solo 24 mph (39 km/h) en una zona de 35 mph (56 km/h). En esa ocasión, no se emitió ninguna multa, ya que el oficial decidió que no se había infringido ninguna ley.

En 2019, un oficial de policía en Providence, Rhode Island, [detuvo uno de los autobuses autónomos de baja velocidad de May Mobility](https://www.usatoday.com/story/money/cars/2019/05/15/police- oficial-detiene-sobre-auto-conducción-lanzadera/3686826002/). Los transbordadores para seis personas recorren un circuito urbano de 12 paradas hacia y desde una estación de tren, pero el primer día de operaciones, un oficial que no estaba familiarizado con el vehículo detuvo a uno. Tampoco resultaron cargos de esa interacción.

También en 2019, un Tesla sin conductor fue detenido después de que su propietario usara la función de llamada remota del automóvil en Florida. Sin embargo, en ese caso, [el incidente fue organizado por un YouTuber](https://insideevs.com/news/374673/confirmed-police-smart-summon-staged/).

Desarrolladores de vehículos autónomos como [Cruise](https://www.youtube.com/watch?v=ZM3kfauMgZY&t=593s) y [Waymo](https://www.washingtonpost.com/technology/2018/10/24/heres -qué-sucede-cuando-la-policía-detiene-un-coche-sin-conductor/) han preparado guías para los socorristas sobre cómo interactuar con los vehículos en caso de emergencias.

And seems to handle the Apple example better than expected :D :

image

cesarvarela commented 2 years ago

In staging 🥳