A CEQL library in Javascript.
CEQL is the Common Elementary Query Language, designed by Stefan Evert as a novice-friendly alternative to the normal CQP query syntax.
Annotation | Syntax | Supported |
---|---|---|
Word | pattern | ✅ |
Primary | _pattern | ✅ |
Secondary | {pattern} | ✅ |
Tertiary | _{pattern} | ✅ |
Combo | {pattern1/pattern2} | ❌ |
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