Read the grammar hidden in your time series.
GrammarViz discretizes a signal into symbols, induces a context-free grammar over them, and turns the grammar's rare and frequent rules into variable-length anomalies and motifs — interactively, as the signal streams in.
Two linear-time algorithms, one interactive tool
Pattern discovery rests on Symbolic Aggregate approXimation (SAX), which turns the signal into a string, and a grammar-induction step — Sequitur or Re-Pair — which builds a context-free grammar from that string. Exploiting the grammar's hierarchy, rare and frequent rules surface as anomalies and motifs of varying length.
Anomaly discovery
Rare Rule Anomaly (RRA) and the rule-density curve find surprising subsequences faster than brute-force or HOT-SAX — without fixing the anomaly length up front.
02 / motifMotif discovery
The most-used grammar rules correspond to recurrent patterns. Numerosity reduction and the CFG hierarchy let a single rule span motifs of different lengths.
03 / tuningParameter optimization
A grammar-reduction heuristic searches the discretization space automatically, ranking the window / PAA / alphabet settings that describe the series most compactly.
Run it as a desktop app, a CLI, or a library
GrammarViz 3.0 is pure Java and runs anywhere a JVM does. Drive the interactive Swing GUI for exploration, script the command line for batch jobs, or link the core as a dependency. The GUI follows an MVC split so the discovery engine is reusable on its own.
You can watch grammar rules form in real time as a signal is acquired.
