Skip to content

Repository files navigation

FastContentParse 0.1.0 — Content parsing for FastJava

Lightweight Java parser and normalizer for building retrieval pipelines.

Build Java Platform License: MIT JitPack

FastContentParse provides a pure-Java content parser, text normalization, and a simple character-based chunker for embedding pipelines. Optionally integrate the native FastContentChunk tokenizer (separate repo) for higher-performance tokenization.

// Quick Start — Example
import fastcontentparse.FastContentParse;

public class Demo {
    public static void main(String[] args) {
        FastContentParse p = new FastContentParse();
        var doc = p.parseString("Hello world", "example.txt");
        System.out.println(doc.getText());
    }
}

Table of Contents


Key Features

  • 🚀 Native Performance — Direct Win32/DirectX access via JNI.
  • ⚡ Zero Overhead — No polling, purely event-driven callbacks.
  • 📦 Zero Dependencies — Just requires Java 17+ and Windows.

📊 Performance

FastXXX is significantly faster than standard Java alternatives:

Operation Standard Java FastXXX Native Speedup
Action A 50 ms 5 ms 10x
Action B 120 ms 12 ms 10x

API Quick Reference

Method Description Path
actionA(...) Brief description of action A. Reference →
actionB(...) Brief description of action B. Reference →

Tip

See REFERENCE.md for full JNI contracts and fallback rules.


📥 Installation

FastJava modules are available via JitPack. Depending on the module type (Pure-Java or JNI-Native), select the appropriate integration:

  • Pure-Java Modules: Only require the main module dependency.
  • JNI-Native Modules: Require two dependencies: the module itself and FastCore (the mandatory native DLL loader).

Option 1: Maven (JitPack)

Add the JitPack repository and the dependencies to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <!-- 1. The main Module -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fastXXX</artifactId>
        <version>v0.1.0</version>
    </dependency>
    
    <!-- 2. FastCore (Required ONLY for JNI-Native Modules) -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fastcore</artifactId>
        <version>v1.0.0</version>
    </dependency>
</dependencies>

Option 2: Gradle (JitPack)

Add this to your build.gradle file:

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.andrestubbe:fastXXX:v0.1.0'
    implementation 'com.github.andrestubbe:fastcore:v1.0.0' // Required ONLY for JNI-Native Modules
}

Option 3: Direct Download (No Build Tool)

Download the latest pre-compiled JARs directly to add them to your project's classpath:

  1. 📦 fastXXX-v0.1.0.jar (The Core Library)
  2. ⚙️ fastcore-v1.0.0.jar (The Mandatory JNI Loader — ONLY for JNI-Native Modules)

Important

Both JARs must be present in your classpath for FastXXX's native functions to operate correctly.


Technical Examples & Hero Demos

See the examples/ directory for technical implementations and high-speed races:

Case Java Example Performance Race / Demo JMH Benchmark
Feature A ExampleA.java “Hero Demo A” JMH_A.java
Feature B ExampleB.java

Documentation


Platform Support

Platform Status
Windows 10/11 (x64) ✅ Fully Supported
Linux 🚧 Planned
macOS 🚧 Planned

License

MIT License — See LICENSE file for details.


Related Projects


Part of the FastJava EcosystemMaking the JVM faster. Small package. Maximum speed. Zero bloat. 🚀📋

About

FastContentParse: lightweight Java parser and normalizer for retrieval pipelines (optional native FastContentChunk tokenizer).

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages