Abstract
We present a scalable, open-source platform that "distills" a potentially large text collection into a knowledge graph. Our platform takes documents stored in Apache Solr and scales out the Stanford CoreNLP toolkit via Apache Spark integration to extract mentions and relations that are then ingested into the Neo4j graph database. The raw knowledge graph is then enriched with facts extracted from an external knowledge graph. The complete product can be manipulated by various applications using Neo4j's native Cypher query language: We present a subgraph-matching approach to align extracted relations with external facts and show that fact verification, locating textual support for asserted facts, detecting inconsistent and missing facts, and extracting distantly-supervised training data can all be performed within the same framework.
Introduction
In the field of Natural Language Processing (NLP), significant progress has been made in relation extraction and entity linking. However, a substantial "engineering gap" remains between academic prototypes and enterprise-grade systems. While research often focuses on high-precision extraction at the sentence or document level, real-world applications require processing millions of documents and integrating the resulting knowledge into existing data ecosystems. Current solutions are frequently either proprietary black boxes or academic tools that lack horizontal scalability. To bridge this gap, we introduce dstlr, an open-source, end-to-end platform designed to distill massive unstructured text collections into searchable, high-fidelity knowledge graphs.
System Architecture
The dstlr platform orchestrates four mature, industry-standard technologies into a unified pipeline to manage the entire data lifecycle, from raw ingestion to graph-based curation.
The pipeline consists of the following layers:
- Document Store (Apache Solr): Serves as the entry point, providing full-text search and metadata capabilities. This allows users to filter specific subsets of documents for targeted analysis.
- Execution Layer (Apache Spark): Orchestrates workloads across a cluster, enabling the system to scale horizontally and handle massive datasets efficiently.
- NLP Extraction (Stanford CoreNLP): Handles Named Entity Recognition (NER), relation extraction (utilizing the KBP annotator for 45 specific relation types), and entity linking to Wikipedia and Wikidata.
- Graph Store (Neo4j): The final repository for the distilled knowledge. By storing the data in Neo4j, users can leverage the Cypher query language to perform complex graph manipulations and analysis.
A critical component of the system is the Enrichment Phase. After extracting raw relations from the text, the system pulls "ground-truth" facts from Wikidata. To maintain efficiency, the system only imports facts for entities actually mentioned in the corpus, preventing the graph from becoming bloated with irrelevant data.
Evaluation and Performance
The platform was evaluated using the TREC Washington Post Corpus, which contains approximately 595,000 news articles and blog posts (roughly 500 million tokens) spanning 2012 to 2017.
The system demonstrated impressive scalability on a modest 9-node cluster:
- Extraction: 97 million triples were extracted in 10.4 hours (approx. 13,000 tokens per second).
- Ingestion: These triples were ingested into Neo4j in 7.8 hours (approx. 2,900 triples per second).
- Querying: Complex subgraph-matching queries to align extracted relations with external Wikidata facts returned results in under 20 seconds.
Applications and Limitations
By treating fact verification as a subgraph-matching problem, dstlr allows users to automatically find supporting evidence for claims, identify contradictions, and discover missing information in external knowledge bases. The system maintains strict provenance, linking every fact back to its specific character offsets in the source documents.
However, the system's accuracy is inherently tied to the underlying NLP extractors. Errors in relation extraction can lead to incorrect graph structures.
As shown in the figure above, the system occasionally misidentifies relations due to co-occurrence in a sentence. In this instance, a department store headquartered in Tokyo was incorrectly linked to Paris because both locations were mentioned in the same context.
Conclusion
The dstlr platform provides a robust, scalable framework for transforming unstructured text into actionable knowledge. By integrating Spark and Neo4j, it enables researchers to perform large-scale knowledge graph construction and verification with minimal engineering overhead. Future work will focus on integrating neural-network-based extractors and automating the mapping between internal relation types and external knowledge base properties.
Summary updated