12 Knowledge graphs

 

This chapter covers

  • Introducing knowledge graphs and their use
  • Extracting entities and relationships from text to create a knowledge graph
  • Using postprocessing techniques on top of knowledge graphs: semantic networks
  • Extracting topics automatically

In this chapter, we’ll continue the work started in chapter 11: decomposing a text into a set of meaningful information and storing it in a graph. Here, we have a clear goal in mind: building a knowledge graph.

In this way we will complete the journey we started 11 chapters ago, of managing and processing data by using graphs as a core technology and mental model. Knowledge graphs represent the summit of what has been discussed throughout the entire book. In previous chapters, you learned how to store and process user-item interaction data for providing recommendations in different shapes and forms, how to deal with transactional data and social networks to fight fraud, and more. Now we will dig deeper into how to extract knowledge from unstructured data.

This chapter is a bit longer than the others and quite dense. You’ll need to read it as a whole to understand not only how to build a knowledge graph out of textual data, but also how to use it for building advanced services. Through diagrams and concrete examples, I’ve tried to make the chapter easier to read and understand; please look at them carefully as you read to be sure that you grasp the key concepts.

12.1 Knowledge graphs: Introduction

12.2 Knowledge graph building: Entities

12.3 Knowledge graph building: Relationships

12.4 Semantic networks

12.5 Unsupervised keyword extraction

12.5.1 Keyword co-occurrence graph

12.5.2 Clustering keywords and topic identification

12.6 Advantages of the graph approach

Summary

References