{'fraction_non_alphanumeric': 0.01695440918019229, 'fraction_numerical': 0.0025845135945415073, 'mean_word_length': 4.942260442260443, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
AI supported Topic Modeling using KNIME-Workflows

Topic modeling algorithms traditionally model topics as list of weighted terms. These topic models can be used effectively to classify texts or to support text mining tasks such as text summarization or fact extraction. The general procedure relies on statistical analysis of term frequencies. The focus of this work is on the implementation of the knowledge-based topic modelling services in a KNIME workflow. A brief description and evaluation of the DBPedia-based enrichment approach and the comparative evaluation of enriched topic models will be outlined based on our previous work. DBpedia-Spotlight is used to identify entities in the input text and information from DBpedia is used to extend these entities. We provide a workflow developed in KNIME implementing this approach and perform a result comparison of topic modeling supported by knowledge base information to traditional LDA. This topic modeling approach allows semantic interpretation both by algorithms and by humans.


Introduction
Recent developments related to Semantic Web made knowledge from the web available as machine readable ontologies. Links and vocabulary mappings between public ontologies enable algorithms to make use of knowledge from the web available as linked open data. One of the most popular public knowledge repositories is DBpedia. The DBpedia project extracts structured data from Wikipedia and makes it accessible as knowledge base via a SPARQL interface. ( [1]) Topic modeling performs analysis on texts to identify topics. These topic models are used to classify documents and to support further algorithms to perform context adaptive feature, fact and relation extraction.
[1], [5] and [6] propose methods to improve word-based topic modeling approaches by introducing semantics from knowledge bases. This reduces perplexity issues arising from ambiguous terms and produces topic models that directly link to the knowledge base. Topic models created using a knowledge base are easier to understand by humans than topic models created exclusively by means of statistics.
This proof of concept work applies the method from [6] to perform knowledge base supported topic modeling using DBpedia. The presented approach to topic modeling is based on the semantics of entities identified in the document. The basic idea of LDA to perform analysis based on term frequency is maintained. The extension of [6] is to enrich the input using a knowledge base to perform LDA with semantics. Therefore, DBpedia Spotlight API is used to recognize entities and additional information to these entities is retrieved via the DBpedia API endpoint. During a preprocessing stage the text is tagged with semantic annotations from the knowledge base and the tagged text is used as input to the LDA algorithm. This results in improved topic models due to more context and less ambiguities in the input.

Architecture
The text to be examined is transferred to DBpedia Spotlight API. Spotlight returns a JSON object containing all entities recognized in the text. Additional information to these entities is retrieved using DBpedia API. The response for each entity is a set of properties e.g. tags, Uri, type and hypernym (see Section 4 for details). A tagger combines these sets with the corresponding entities in the text. The result is processed by LDA. LDA performs topic modeling and provides the result in two formats (as a table with weights and as an image visualization). The architecture of the processing pipeline is illustrated in Fig. 1.

KNIME
The KNIME information miner is an open source modular platform for visualization and selective execution of data pipelines. KNIME as a powerful data analysis tool that enables simple integration of algorithms, data manipulation and visualization methods in the form of modules or nodes [7].
There are a number of additional services in the KNIME ecosystem, e.g. KNIME Server, which connects the different actors (services, teams and individuals) in a central place and thus offers a platform for collaboration. KNIME Workflow Hub makes workflows publicly available on the KNIME Examples Server. Members of the user community can share workflows and receive ratings and comments from other users. In our work with the KNIME analytical platform we have implemented and performed various modelling methods to offer complete services around semantic analysis.

Workflow for Topic Modeling
The workflow developed in this work consists of four stages: (1) Reading the text in consideration and Entity recognition using DBpedia-Spotlight API. (2) Getting properties of the entities included in the JSON. (3) Tagging the text by combining the entities and the related properties gained from the previous phase. (4) Text cleaning and topic modeling using the LDA algorithm. Fig. 2 gives an overview of the workflow developed and its modularization into four stages.
The Reading stage includes Table Creator node, which provides the settings of the parameters used to request entities from DBpedia Spotlight. We use confidence=0.5 and support=0 to get as many entities as possible from the text. File Reader node for reading the text from a path. String Manipulation node to repair the text, e.g. to replace double spaces. Column Appender node to combine the data provided by the Table Creator and File Reader nodes. String Manipulation node prepares the URL request to DBpedia Spotlight, which is then sent by the node Get Request. The output of this stage is a table of the text entities recognized by DBpedia Spotlight as shown in Fig. 3.
The Get properties stage contains Column Filter node to extract the entities column from the table. Java Snippet node to filter Resources from the JSON. The String to JSON, JSON to Table, Transpose and JSON to Table nodes to put the column content in the format required for further processing. Column Filter node filters types and surfaceForms. Java Snippet node sends a HTTP request containing a SPARQL query to DBpedia API and retrieves entities and the related tags. Missing Value node deletes null values and Column Filter node filters surface forms (entities) and tags from the table created, which build the output of this stage as illustrated in Fig. 4.
The tagging stage implements a loop taking the original input text and the recognized entities with their tags to match these entities with their mentions in the original text and enrich it by the tags as shown in Fig. 5   In the text cleaning and topic modeling stage, the produced document will be cleaned by Column Filter 5 , Number Filter, Punctuation Erasure, Stop Word Filter, Case Converter and Snowball Stemmer. That preprocessed text is passed to Topic Extractor node that implements the LDA algorithm. LDA creates the topic model as list of weighted terms, which are then visualized using Color Manager and Tag Cloud nodes.

Evaluation
The focus of this work was on the implementation of the knowledge-based topic modelling services in a Knime workflow. For a detailed description and evaluation of the DBPedia based enrichment approach and the comparative assessment of enriched topic models we refer to our earlier work in [6] and [8]. In this paper we demonstrate the Knime-based proof-of-concept implementation by comparing the results of topic modeling supported by knowledge base information to traditional LDA using the following text:

Barack Obama is only passing through Germany on his trip to Europe later this week and does not plan to hold substantial talks with Angela Merkel. The White House views the chancellor as difficult and Germany is increasingly being left out of the loop.
This text is expanded with annotations from DBpedia as follows:  Fig. 6 shows the image visualization of weighted, normalized terms created by LDA without semantic annotations and Fig. 7 the weighted, normalized terms obtained with support of a knowledge base. The results reflect the expectations. LDA provides a naive topic model for the original text comprising of weighted lemmatized terms from the input text with only one term having a significantly higher weight than other terms of the model. The knowledge base supported method creates a superior topic model also containing weighted lemmatized terms from the knowledge base, which are not present in the input text. This topic model enables semantic interpretation by algorithms as well as by humans.
In particular the enriched topic model enables algorithms to infer from the topic model linked to a knowledge base that the input text contains information about politics and actions of relevant officials, while a classification based on the traditional LDA topic model might result in a false classification as geographical text.

Summary and Future Prospects
This proof of concept work developed a KNIME workflow to perform comprehensive topic modeling using a knowledge base. The use of information from a knowledge base is achieved by using DBpedia Spotlight API for entity recognition and DBpedia API to retrieve entity properties. The presented results show that the developed approach is applicable and delivers results containing more comprehensive insights into a text than statistical topic models based on words only. The created topic models can improve the results of various methods used for text mining tasks such as text classification or fact and relation extraction.
Topic modeling using knowledge bases is a step towards improved automated methods for knowledge base population. Other methods in natural language processing might also be extendable by applying the idea of annotating text with information from