/ceql

A CEQL library in Javascript

Primary LanguageJavaScriptMIT LicenseMIT

Build Status Coverage Status

CEQL.js

A CEQL library in Javascript.

What is CEQL?

CEQL is the Common Elementary Query Language, designed by Stefan Evert as a novice-friendly alternative to the normal CQP query syntax.

Support

Annotation Syntax Supported
Word pattern
Primary _pattern
Secondary {pattern}
Tertiary _{pattern}
Combo {pattern1/pattern2}

Usage

Quick start

var ceql = require('ceql');

// Transform CEQL Query into RegExp
var p = ceql.toregex('some[string,orelse]');
console.log(p)
> /some(string|orelse)/

// Validate a given String (is valid CEQL input)
var v = ceql.validate('super_VERB');
console.log(v)
> true