Abstract
When designing Natural Language Processing (NLP) applications that use Machine Learning (ML) techniques, feature extraction becomes a significant part of the development effort, whether developing a new application or attempting to reproduce results reported for existing NLP tasks. We present EDISON, a Java library of feature generation functions used in a suite of state-of-the-art NLP tools, based on a set of generic NLP data structures. These feature extractors populate simple data structures encoding the extracted features, which the package can also serialize to an intuitive JSON file format that can be easily mapped to formats used by ML packages. EDISON can also be used programmatically with JVM-based (Java/Scala) NLP software to provide the feature extractor input. The collection of feature extractors is organised hierarchically and a simple search interface is provided. In this paper we include examples that demonstrate the versatility and ease-of-use of the EDISON feature extraction suite to show that this can significantly reduce the time spent by developers on feature extraction design for NLP systems.
Introduction
In the field of Natural Language Processing (NLP), "feature engineering"—the process of transforming raw text into meaningful inputs for machine learning models—is frequently the most labor-intensive phase of development. While researchers describe their features in academic papers, they often omit granular implementation details such as exact window sizes or specific handling of sentence boundaries. This lack of transparency creates a significant barrier to reproducing state-of-the-art results.
Furthermore, a structural mismatch exists between NLP tools and Machine Learning (ML) frameworks. NLP tools typically produce rich, hierarchical data structures like trees, graphs, and spans, whereas ML frameworks generally require flat feature vectors. EDISON was developed to bridge this gap, providing a standardized library of "reference implementations" that simplify the transition from linguistic structures to machine-ready inputs.
Core Architecture and Methodology
EDISON is built upon a few key innovations designed to standardize and simplify the extraction process:
- Unified Data Structure: The library centers on the
TextAnnotationobject. This acts as a comprehensive container for various "Views" of a text, such as Part-of-Speech (POS) tags, Named Entity Recognition (NER), or Semantic Role Labeling (SRL). This structure allows different linguistic layers to coexist and be accessed consistently.
- The FeatureExtractor Interface: This provides a programmatic way to define features. An extractor takes a linguistic unit (a
Constituent) and returns a set of features. By decoupling extraction logic from the underlying data source, developers can swap out components (like a POS tagger) without rewriting their feature extraction code. - Systematic Naming Convention: To eliminate the "black box" nature of many tools, EDISON uses a strict naming grammar:
[Source]-[N-gram]-[Operator]-[Window]-[Position]. For example, an extractor namedPOSAndWordBigramsThreeBeforeexplicitly describes its data source and spatial context. - Serialization and Integration: For developers working outside the Java ecosystem, EDISON can export features into JSON, SVM-Light, or Weka (XRFF) formats. It is also designed for seamless integration with modern JVM-based learning frameworks like Saul or LBJava.
Validation and Results
The primary goal of EDISON is to ensure functional parity with existing state-of-the-art tools. To validate this, the authors re-implemented feature sets for major NLP tasks, including POS tagging, chunking, and NER.
Verification tests demonstrated a 1:1 match between the features produced by legacy systems (such as the CogComp Chunker) and the new EDISON implementations. This parity proves that EDISON can reliably reproduce the feature sets of high-performing models while offering a much cleaner, more maintainable codebase.
Conclusion and Future Work
EDISON represents a shift toward treating features as "reference implementations." By providing the exact code used in successful research, it eliminates the ambiguity of natural language descriptions and promotes reproducibility. While currently focused on English and the JVM environment, the library is designed to be language-agnostic. Future work includes expanding the suite of extractors to cover more complex tasks like Co-reference resolution and Wikification. The library is publicly hosted, and the authors encourage the NLP community to contribute new extractors to further simplify the development of advanced NLP applications.
Summary updated