Skip to content

miguelrochefort/box2card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

box2card

Convert Wikipedia infoboxes into Adaptive Cards.

box2card logo

Overview

Adaptive Cards

Adaptive Cards are platform-agnostic UI elements described in JSON that can be rendered and presented in a wide variety of environments such as websites, mobile apps, digital assistants, and messaging platforms. They represent an opportunity for creating and reusing high-level UI templates compatible with popular ontologies and schemas, such as Schema.org. Unfortunately, very few templates have been created and shared by the community since the project's inception in 2016.

Adaptive Cards

Source

Wikipedia infoboxes

Wikipedia infoboxes are tables of data typically presented on the right of Wikipedia articles that describe and summarize their subject. Wikipedia's list of infobox templates includes over 1,450 distinct infobox templates, covering a wide range of subjects. These templates were carefully crafted and iterated over for decades by a large community of domain experts to capture the unique presentation characteristics of their domains. This effort is unlikely to be replicated, and it seems unwise not to leverage such an ontological goldmine.

Wikipedia infobox

Source

box2card

The box2card project is an experiment and a proof-of-concept that attemps to find whether the effort invested by the Wikipedia community into infobox templates can be leveraged to fill the gap in Adaptive Card's community templates.

Research questions

  1. Can infobox templates be partially or completely converted into adaptive card templates?

  2. Can infobox schemas be mapped to external ones such as Schema.org without losing formatting information?

  3. Can infobox designs fit into or be adapted for non-encyclopedic use cases such as digital assistants and messaging platforms?

  4. Can infobox categories naturally be extended to include non-encyclopedic ones such as GitHub issues, restaurant reservations, business cards, product reviews, and social media posts?

Methods

To answer question 1 (feasibility of infobox template extraction), I implemented a Python script which, given an entity (Wikipedia article):

  1. Extracts the data of its infobox (JSON).

  2. Converts (best effort) the template of its infobox as an adaptive card template (JSON).

This pair of data and template JSON payloads can then be rendered using the Adaptive Cards Designer to analyze the effectiveness of the approach.

Results

Preliminary results regarding question 1 were obtained by testing the tool against 12 distinct entities belonging to different categories:

  1. Amazon (company)

  2. Changi Airport (airport)

  3. Eiffel Tower (landmark/building)

  4. F.C. United of Manchester (sports team)

  5. Guitar (musical instrument)

  6. Homer Simpson (fictional character)

  7. Museum of Modern Art (place)

  8. Squid Game (TV series)

  9. Steve Jobs (person)

  10. Terminator 2 (movie)

  11. Tesla Model 3 (car)

  12. The Dark Side of the Moon (music album)

The rendered adaptive cards can be seen below:


1. Amazon

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Amazon


2. Changi Airport

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Changi Airport


3. Eiffel Tower

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Eiffel Tower


4. FC United of Manchester

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

FC United of Manchester


5. Guitar

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Guitar


6. Homer Simpson

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Homer Simpson


7. Museum of Modern Art

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Museum of Modern Art


8. Squid Game

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Squid Game


9. Steve Jobs

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Steve Jobs


10. Terminator 2

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Terminator 2


11. Tesla Model 3

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

Tesla Model 3


12. The Dark Side of the Moon

Wikipedia article

Open in Adaptive Cards Designer (select Preview mode)

The Dark Side of the Moon


Discussion

While these preliminary results are not perfect (many elements are missing, some wikidata templates are not supported, line breaks are inconsistent, lists are not ideally rendered), they show the potential of the approach and indicate that extracting infobox templates is at least partially feasible.

Releases

No releases published

Packages

No packages published