Learn about technology, digital transformation and many more topics with our publications.

Z

I want my Anime portal: from ontologies to Linked Open Data

Citizen

Luis Bertel

It makes me happy to read, my favorite color is Tungsten Blue, my favorite food is Kebab.

June 12, 2020

After my colleagues, friends and family provided me with a fairly complete list of series and movies to mitigate the confinement and drudgery of the last few days, I confess that it was not enough. In the end I ended up opting for a narrative genre that grants itself more liberties compared to film and television formats, anime. I started with the safe and classic recommendations of my peers: Death Note, Bleach, Shingeki No Kyojin, Psycho Pass, Kimetsu No Yaiba, One Punch Man, and a long list of others.

With the list prepared I searched for anime series in the portals that google gave me or the recommended ones (who else if not my colleagues), after using them at the end I had the feeling that they were missing something. So I start the check list with the features I want for my anime portal, I share them below.

1. As an anime consumer, I need to add a review of the anime to give my opinions.

Although it may seem a small requirement, the review I want for the portal differs from the action of writing in a text box what I think of it (well yes, it is the basic objective, but I want to go further). To better express the idea, I will make a review of the anime Elfen Lied, I liked its opening (musical curtain that is usually used at the beginning of the anime -please forgive the spanglish pleonasm-) not as much as its plot.

Although it may seem a small requirement, the review I want for the portal differs from the action of writing in a text box what I think of it (well yes, it is the basic objective, but I want to go further). To better express the idea, I will make a review of the anime Elfen Lied, I liked its opening (musical curtain that is usually used at the beginning of the anime -please forgive the spanglish pleonasm-) not as much as its plot.

Going back to the request, the main objective is to make some sense of all the information described in the review. Normally, to provide more detail, one could create links to other pages that talk about, for example, Gustav Klimt and his paintings, Gregorian chants, Agnus Dei, Mozart, Barber, etc. But I want to go beyond creating links to pages, I would like the concept of painter to be related to Klimt and that through this link I could know other painters with a similar style, even relate anime with musical works that would allow me to search for anime that use music of the same type.

2. As an anime consumer I require linking the anime portal with others of the same type to expand title searches across all linked portals.

How interesting it would be to be able to link portals and create a kind of mesh where you can search for anime information in a global and specialized way. To go beyond google searches, the portals must have a common vocabulary that allows them to “talk” and “process” information requests among themselves (machines).

If the portal were to search for Dragon Ball anime, I am interested that it returns all the matches of the portals linked to the name of: Son Goku, Kakarotto, Akira Toriyama, etc.

3. As an anime consumer I require to do semantic searches to be more assertive in the results.

And why not, imagine that the mesh of anime portals can infer new information based on defined content classification rules such as category, year, author, etc.

I imagine myself asking the following question to the anime portal network:

“Find me anime whose plots are based on dystopian societies based on George Orwell’s 1984 and similar to Psyco Pass”

As a result of the query, the anime series that meet the criteria will be displayed, no matter in which portal they are hosted.

I think I know what you’re thinking reader friend: you want to cram artificial intelligence and natural language processing for a simple anime portal, remember I’m bored, locked up and on a time crunch.

Once the WHAT of the matter has been defined and the portal requirements have been stated, we proceed to state the HOW.

A traditional approach to develop a portal of this type would be given by a relational model that would allow me to make an initial classification of authors, type, year, etc. Its storage on a database engine such as MySQL, Postgresql, etc. would be implemented. A web page display system (either sent by a web server by HTML page requests or through SPA -Single Page Application-).

This type of development would not work in order to provide a solution to the requirements we have set out, so we looked for other alternatives that would bring us closer to our objectives.

After spending some good hours looking for ways to develop the portal, I find -what I believe- the solution to fulfill the requirements, the Semantic Web comes to my aid, but understanding its paradigm and its implementation is another thing and I spend more hours of consultation and laboratories based on trial and error in this task.

The first concept to be clear about when trying to use the Semantic Web is ontologies. The first thing I found about ontologies is related to philosophy and metaphysics, I share with you one of the many definitions I found.

Ontology is a part or branch of philosophy that studies the nature of being, existence and reality, trying to determine the fundamental categories and relations of -being as bein

Taken from: https://www.significados.com/ontologia/

As much as I try to remember my high school Philosophy classes, the only thing that comes to mind is the image of Homer Simpson when he has the little monkey playing the cymbals in his head, literally.

Fortunately, the concept of ontology in the context of information theory refers to knowledge domains, which is easier to understand.

An ontology is a formal definition of types, properties, and relations between entities that actually or fundamentally exist for a particular domain of discourse. It is a practical application of philosophical ontology, with a taxonomy

Tomado de: https://es.wikipedia.org/wiki/Ontolog%C3%ADa_(informática)

In the definition of ontology we can extract the most important concept which is “formal definition of types, properties, and relationships between entities that actually or fundamentally exist for a particular domain of discourse”, in other words, I need an expert(s) in the domain of discourse (anime is our discourse) to help me describe through properties and relationships what anime consists of. Another important issue in the definition of ontology is taxonomies, which is nothing more than classifying information (remember the classes in biology: species, genera, phylum subphylum, etc).

At this point I want to emphasize the concept of classification, a term that goes unnoticed in everyday life (except for those who are in the area of data analysis, now they must be rubbing their hands together). Since we were children we have been taught to classify (colors, shapes, etc.), our ancestors through classification have provided us with a better way of life by choosing the best varieties of plants that are resistant to pests, produce more harvest, among many other desirable characteristics. Classification is internal to humans, it is one of the mechanisms that allow us to advance as a species, we do it unconsciously either rationally or by scale of social and ethical values (a typical example is when our mothers told us: I don’t like you to get together with so and so). In the past, those who had more assertiveness at the time of classification were the old men of the tribe (survival depended on the decisions they made), partly due to the accumulation of lived experiences, the sayings “don’t teach your father to make children, the devil knows more for an old man than for a devil” are not gratuitous.

All that knowledge acquired based on experience is called heuristics (let those countless hours watching anime come to light), and that is what my anime experts possess. They are at the same level of a craftsman cabinetmaker who knows how to choose the wood to make his furniture or the winemaker who just by seeing the color of the wine and its fragrance knows if it is good or bad, without even tasting it. Now the challenge we have is how to represent (instrumentalize) that knowledge (which in a certain way is subjective and its validity is only achieved by a group of experts). The problem is not trivial, how to make the experts’ knowledge generate answers to the portal’s questions. To put the problem in context, if you had values such as the tastes of some number of people based on their category, etc, I would use decision trees (based on yes and no) that allow me by expert judgment to classify the cases to be analyzed (not to be confused with trees based on Shannon’s information entropy theory, which are built with mathematical models).

Returning to the problem, I find that ontologies already have their “form” to represent expert knowledge. The Web Ontology Language (WEB Ontology Language -OWL) is used and is described through XML-like tags.

When consulting on the creation of ontologies with OWL, they always refer to the example of wine classification. Figure 1 shows the ontology classification in the Protégé program, which is an ontology editor. Figure 2 illustrates the ontology concept, constraint and dependency map. Ontologies use elements of set theory such as: domain, range, disjoint sets, properties of inverse sets, transitivity and symmetry, universal set, existence restrictions, and many other concepts. At the end of the article I share an extract of the source code of the ontology.

Overwhelmed with the construction of the anime ontology and thinking if it is worth so much effort for a portal, I wonder if someone has already come up with the same idea and fortunately for me, the answer is yes. I found on the Internet an ontology that describes the anime knowledge domain (at the end of the document I leave the link).

From this first part I am left with a bit of an unpleasant feeling about the semantic web, a technology that promises to give order to the chaos of information that exists on the Internet and through it provide semantics to our Web pages, but at the same time its lack of simplicity at the time of implementation makes it difficult to massify.

Let’s leave the article at this point (it is already quite long), at another time I will tell you how I solved the construction of the anime ontology, its linkage with other domains of knowledge and its implementation in linked open data.

Dear reader, if you have arrived here, congratulations, you are a complete geek or developer.

I express my thanks to the editor for letting me write in the first person.

Fig 1. Structure of the wine ontology deployed in Protégé.

Excerpt from the wine ontology code.

5/5 - (1 vote)

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You may also be interested in reading