Reader small image

You're reading from  Hands-On Graph Analytics with Neo4j

Product typeBook
Published inAug 2020
PublisherPackt
ISBN-139781839212611
Edition1st Edition
Tools
Right arrow
Author (1)
Estelle Scifo
Estelle Scifo
author image
Estelle Scifo

Estelle Scifo possesses over 7 years experience as a data scientist, after receiving her PhD from the Laboratoire de lAcclrateur Linaire, Orsay (affiliated to CERN in Geneva). As a Neo4j certified professional, she uses graph databases on a daily basis and takes full advantage of its features to build efficient machine learning models out of this data. In addition, she is also a data science mentor to guide newcomers into the field. Her domain expertise and deep insight into the perspective of the beginners needs make her an excellent teacher.
Read more about Estelle Scifo

Right arrow
Empowering Your Business with Pure Cypher

In the previous chapters, we introduced the concepts behind Neo4j and learned how to query it using Cypher. It is now time to build our first working application of graph databases. The first step when entering the graph database ecosystem is usually to try and build a knowledge graph of your business or industry. In this chapter, you will learn what a knowledge graph is and how to build one from structured or unstructured data. We will use some Natural Language Processing (NLP) techniques and query existing knowledge graphs such as Wikidata. We will then focus on two possible applications of knowledge graphs in the real world: graph-based search and recommendations.

The following topics will be covered in this chapter:

  • Knowledge graphs
  • Graph-based search
  • Recommendation engine

Technical requirements

Knowledge graphs

If you have followed Neo4j news for the last few years, you have probably heard a lot about knowledge graphs. But it is not always clear what they are. Unfortunately, there is no universal definition of a knowledge graph, but let's try to understand which concepts are hidden behind these two words.

Attempting a definition of knowledge graphs

Modern applications produce petabytes of data every day. As an example, during the year 2019, every minute, the number of Google searches has been estimated to be more than 4.4 billion. During the same amount of time, 180 billion emails, and more than 500,000 tweets are sent, while the number of videos watched on YouTube is about 4.5 billion. Organizing this data and transforming it into knowledge is a real challenge.

Knowledge graphs try to address this challenge by storing the following in the same data structure:

  • Entities related to a specific field, such as users or products
  • Relationships between entities, for instance,...

Recommendation engine

Recommendations are now unavoidable if you work for an e-commerce website. But e-commerce is not the only use case for recommendations. You can also receive recommendations for people you may want to follow on Twitter, meetups you may attend, or repositories you might like knowing about. Knowledge graphs are a good approach to generate those recommendations.

In this section, we are going to use our GitHub graph to recommend to users new repositories they are likely to contribute to or follow. We will explore several possibilities, split into two cases: either your graph contains some social information (users can like or follow each other) or it doesn't. We'll start from the case where you do not have access to any social data since it is the most common one.

Product similarity recommendations

Recommending products, whether we are talking about movies, gardening tools, or meetups, share some common patterns. Here are some common-sense assertions that can...

Summary

This chapter described in detail how to create a knowledge graph, either using already structured data, such as an API result, or an existing knowledge graph that can be queried, such as Wikidata. We also learned how to use NLP and named entity recognition in order to extract information from unstructured data, such as a human-written text, and turn this information into a structured graph. We have also learned about two important applications of knowledge graphs: graph-based search, the method used by Google to provide even more accurate results to the users, and recommendations, which are a mandatory step for e-commerce today.

All of this was done with Cypher, extended by some plugins such as APOC or the NLP GraphAware plugin. In the rest of this book, we will make extensive use of another very important library when dealing with graph analytics: the Neo4j Graph algorithms library. The next chapter will introduce it and give application examples in the context of the shortest...

Questions

Using Wikidata, what kind of contextual information can we add to the repository language?

Further reading

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Graph Analytics with Neo4j
Published in: Aug 2020Publisher: PacktISBN-13: 9781839212611
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Estelle Scifo

Estelle Scifo possesses over 7 years experience as a data scientist, after receiving her PhD from the Laboratoire de lAcclrateur Linaire, Orsay (affiliated to CERN in Geneva). As a Neo4j certified professional, she uses graph databases on a daily basis and takes full advantage of its features to build efficient machine learning models out of this data. In addition, she is also a data science mentor to guide newcomers into the field. Her domain expertise and deep insight into the perspective of the beginners needs make her an excellent teacher.
Read more about Estelle Scifo