Topic Extraction with MeaningCloud demo for your implementation

Following our article on topic extraction with MeaningCloud and Graphileon we had some users asking for instructions on how to build that application themselves.

In this article we’ll describe the 2nd demo from that blog post, a Graphileon application which allows you add ‘Documents’ -pieces of text on a particular topic- which are then processed by MeaningCloud, recreated as a graph by Graphileon, and correlated to other documents that share vectors with the source article.

This application itself is quite small -16 additional function nodes in total only- so it fits exactly within the limit of 64 graphileons allowed by our Personal Edition version 2.2.0.

Requirements

This is what do you need to recreate this application yourself:

Setting up Neo4j

Preferably, you should install Graphileon on an empty graph store as this prevents you from running into the limit of 64  graphileons that are allowed under the PE license. In case you have already set up Graphileon with an application store, the easiest way to connect to a new store is by creating a new graph store with the same password and port number as the application store that you used with Graphileon previously. If you have problems connecting to the newly created graph store you should check our trouble shooting section and possibly update the config.json file manually.

When setting up your new graph store in Neo4j Desktop (or Server), make sure you also install the APOC extensions and Graph Algorithms library as in the image below.

Topic extraction in Graphileon
Neo4j Desktop with APOC and Graph algorithms installed

 

Registering with MeaningCloud

Visit the MeaningCloud website, register for a free account and obtain your API key.

Adjust and run our script

Download the script for this demo and open it in a text editor to make the following adjustments:

  1. Replace the text MEANINGCLOUDAPIKEY by the actual key you obtained.
  2. Check the name of the dashboard to which you want to connect the application. For the default configuration from a new installation of version 2.2.0 or higher this is “Default” and you do not need to alter the script.
    You can check the name of your dashboard(s) by running the following query with output set to Grid.
MATCH (n:IA_Dashboard) RETURN n.name

If the name of the dashboard is different from “Default”, you will have to adjust the script accordingly.

Now log in to your Graphileon PE and copy-paste the entire modified script to the Cypher box and execute. The query will add the nodes and relations for this demo application to your application store and displays them in a NetworkView once finished.
If you want to look under the hood, to see how the demo works, you can retrieve all relevant functions with the following Cypher statement.

MATCH (n:DEMO_MC1) OPTIONAL MATCH (n)--(m) RETURN n,m

You can reorganize the layout of these nodes and save them as a diagram for later retrieval using the  [Save Diagram] button on the NetworkView. This is similar to the diagram published with the original post although you will have to reorganize the layout accordingly.

Now you only need to reload Graphileon (Ctrl-R) and you’ll see a button on the dashboard plus a popup window named Documents.

Explanation and how to use

The application consists of 5 “views”

  • Documents: the list that is started with the dashboard and from which you can select an existing document for editing or delete a document.
  • MeaningCloud form: a data-entry form.
  • Document graph: this shows the network for the selected document.
  • Vector list: showing the dimensions/vectors for the selected document.
  • Similarity list: showing the 10 most similar documents, based on cosine similarity.

The list of Documents appears immediately after the dashboard has loaded and the MeaningCloud form can be displayed using the button on the dashboard. Other views can be displayed from either the context menu of the document list or will popup once you start adding documents from the MeaningCloud form.

Graphileon topic extraction demo
Graphileon topic extraction demo

 

Using the application:

  • Click on the [MeaningCloud form] button to add new documents.
  • Enter an id (short title) for the document.
  • Now paste or enter text for your document in the contents box.

The contents box is scanned every 10 seconds and passed to the MeaningCloud service for processing. The returned terms and topics are inserted into your graph on the fly.

When the text is adjusted or removed the graph is modified accordingly.

The [Clear form] button resets the title and contents so you can start a new document.

The list of documents implements three context menu options on right-click of a row in the list:

  • show graph & vector and similar
  • show document node and links
  • delete document

Graphileon function usage

This demo uses the following Graphileon functions:

  • IA_FormView: to configure and display a form for data entry, based on https://jsonforms.io/
  • IA_Timer: to scan the content of the MeaningCloud form at 10 second intervals and pass the contents on for analysis
  • IA_Request: the function that connects to the MeaningCloud service, passes the content text and receives the processed entities and concepts
  • IA_CypherQuery: Nine queries process data for display in Network and TableViews
  • IA_TableVIew: A simple table to display the list of documents
  • IA_AgGridView: A more advanced table view based on the powerful ag-Grid framework

And that’s it!

This instruction should get you up and running with the Topic Extraction demo and hopefully provide you with a lot of inspiration for building your own graphy applications in Graphileon!


Card image cap
Graphileon partners with thatDot to support Quine streaming graph for real-time analytics

Graphileon partners with thatDot to develop connectors for Quine (quine.io), an open-source streaming graph solution for event-driven applications.

Card image cap
Release of Graphileon 3.6.0

The release of Graphileon 3.6.0 brings numerous enhancements and features to this graph database management software. Here are the key highlights: New Components and Features: This version introduces new and improved components (Functions) and incorporates user-requested features, enhancing the functionality of the software. Enhanced Visualization: Users can now customize the visualization of nodes in the … Continued

Card image cap
The Graphileon App Library

Graphileon includes an App Library since version 3.1. The App Library contains demos to inspire you and to get you started building your own graphy applications. We included demo configurations ranging from a simple “Hello World” popup to examples that show you how to work with Google Maps, Google Charts, API calls, node templating or … Continued

Get started with Graphileon Personal Edition in the cloud or on your desktop.

The easiest way to get to know Graphileon is to spin up the Personal Edition in the Graphileon Cloud. It comes with two graph stores installed and access to the App Library with examples and apps. You can also download and install Graphileon Personal Edition to run it on your desktop. Either way, you will be able to build graphy applications an browse your graph stores in a way you never did before.