<commit_before>= CIP<CCYY>-<MM>-<DD> - <The title of the CIP>
:numbered:
:toc:
:toc-placement: macro
:source-highlighter: codemirror

*Author:* <Author name> <Author email>

[IMPORTANT]
.Guidelines
====
* Please use this template as a guide.
  To aid clarity and give an idea of what the pertinent section denotes, some headings have example text.

* The file naming convention is _CIP<CCYY>-<MM>-<DD>-short-title-words.adoc_.

* Label the pull request for the CIP with the correct Cypher vocabulary(ies).

* The CIP may only consider Cypher language features.
  This means the CIP must make no mention of Neo4j.

* Format Cypher and EBNF for readability.

* Write one sentence per line.
====

[abstract]
.Abstract
--
This is a high-level summary of the aim and description of the CIP.
--

toc::[]


== Motivation

Provide the rationale and justification for the proposed feature(s).

== Background

This is further background regarding the CIP, should it be required or deemed useful.

Please ensure that links to related documents (including other CIPs) are provided.

== Proposal

This comprises the detail of the CIP, and is divided into the sub-sections below.

=== Examples

For each aspect of the proposed feature(s), provide at least one Cypher example query to show how the feature is envisaged to work, along with explanatory text.

_An example of this is shown below:_

[source, cypher]
.Find all persons whose name starts with "And"
----
MATCH (a:Person) WHERE a.name STARTS WITH “And”
RETURN a
----

[source, cypher]
.Find all persons whose name starts with the parameter prefix
----
MATCH (a:Person) WHERE a.name STARTS WITH {prefix}
RETURN a
----

[source, cypher]
.Find all persons whose name ends with "fan"
----
MATCH (a:Person) WHERE a.name ENDS WITH "fan"
RETURN a
----

[source, cypher]
.Find all books whose isbn in string form contains "007"
----
MATCH (b:Book) WHERE toString(b.isbn) CONTAINS "007"
RETURN a
----

=== Syntax

Provide the full range of syntactic additions and modifications in EBNF (https://en.wikipedia.org/wiki/Extended_Backus-Naur_Form) format, along with explanatory text.

_An example of this is shown below:_

[source, ebnf]
.Extend expressions to support string search operators
----
expression    = current definition of expression
              | string-search
              ;

string-search = starts with | ends with | contains ;
starts-with   = expression, "STARTS", "WITH", expression ;
ends-with     = expression, "ENDS", "WITH", expression ;
contains      = expression, "CONTAINS" expression ;
----

=== Semantics

Provide a description of the expected semantics of the new feature(s).
Use subheadings to structure the content.

_Examples are shown below in sections 3.3.1–3.3.3:_

==== STARTS WITH

Using `lhs STARTS WITH rhs` requires both `lhs` and `rhs` to be strings. This new expression evaluates to true if `lhs` textually starts with `rhs`. Otherwise, it is false.

==== ENDS WITH

Using `lhs ENDS WITH rhs` requires both `lhs` and `rhs` to be strings. This new expression evaluates to true if `lhs` textually ends with `rhs`. Otherwise, it is false.

==== CONTAINS

Using `lhs CONTAINS rhs` requires both `lhs` and `rhs` to be strings.
This new expression evaluates to true if `lhs` textually contains `rhs`.
Otherwise, it is false.

If any argument to `STARTS WITH`, `ENDS WITH`, or `CONTAINS` is `NULL`, then the result of evaluating the whole predicate is `NULL`.

It is a type error to use `STARTS WITH`, `ENDS WITH`, or `CONTAINS` with a value that is not a string.

=== Interaction with existing features

Provide details on any interactions that need to be considered.

=== Alternatives

List any alternatives here; e.g. new keywords, a smaller feature set etc.

== What others do

If applicable, include a feature comparison table, along with any useful links.

To provide a well-rounded comparison, please ensure the inclusion of at least one SQL-based implementation -- such as DB2 or Postgres -- as well as SPARQL.
If you require any assistance or pointers to the latter, please contact <EMAIL>.

== Benefits to this proposal

List the benefits here.
<commit_msg>More changes to the CIP Template to make it easier to use<commit_after>= CIP<CCYY>-<MM>-<DD> - <The title of the CIP>
:numbered:
:toc:
:toc-placement: macro
:source-highlighter: codemirror

*Author:* <Author name> <Author email>

[IMPORTANT]
.Guidelines
====
* Please use this template as a guide.
  To aid clarity and give an idea of what the pertinent section denotes, some headings have example text.

* The file naming convention is _CIP<CCYY>-<MM>-<DD>-short-title-words.adoc_.

* Label the pull request for the CIP with the correct Cypher vocabulary(ies).

* The CIP may only consider Cypher language features.
  This means the CIP must make no mention of Neo4j.

* Format Cypher and EBNF for readability.

* For text in paragraphs, write one sentence per line.
====

[abstract]
.Abstract
--
This is a high-level summary of the aim and description of the CIP.
--

toc::[]


== Motivation

Provide the rationale and justification for the proposed feature(s).

== Background

This is further background regarding the CIP, should it be required or deemed useful.

Please ensure that links to related documents (including other CIPs) are provided.

== Proposal

This comprises the detail of the CIP, and is divided into the sub-sections below.

=== Examples

For each aspect of the proposed feature(s), provide at least one Cypher example query to show how the feature is envisaged to work, along with explanatory text.

_An example of this is shown below._

Find all persons whose name starts with "And":
[source, cypher]
----
MATCH (a:Person) WHERE a.name STARTS WITH “And”
RETURN a
----

Find all persons whose name starts with the parameter prefix:
[source, cypher]
----
MATCH (a:Person) WHERE a.name STARTS WITH {prefix}
RETURN a
----

Find all persons whose name ends with "fan":
[source, cypher]
----
MATCH (a:Person) WHERE a.name ENDS WITH "fan"
RETURN a
----

Find all books whose isbn in string form contains "007":
[source, cypher]
----
MATCH (b:Book) WHERE toString(b.isbn) CONTAINS "007"
RETURN a
----

=== Syntax

Provide the full range of syntactic additions and modifications in EBNF (https://en.wikipedia.org/wiki/Extended_Backus-Naur_Form) format, along with explanatory text.

_An example of this is shown below._

Extend expressions to support string search operators:
[source, ebnf]
----
expression    = current definition of expression
              | string-search
              ;

string-search = starts with | ends with | contains ;
starts-with   = expression, "STARTS", "WITH", expression ;
ends-with     = expression, "ENDS", "WITH", expression ;
contains      = expression, "CONTAINS" expression ;
----

=== Semantics

Provide a description of the expected semantics of the new feature(s).
Use subheadings to structure the content.

_Examples are shown below in sections 3.3.1–3.3.3:_

==== STARTS WITH

Using `lhs STARTS WITH rhs` requires both `lhs` and `rhs` to be strings.
This new expression evaluates to true if `lhs` textually starts with `rhs`.
Otherwise, it is false.

==== ENDS WITH

Using `lhs ENDS WITH rhs` requires both `lhs` and `rhs` to be strings.
This new expression evaluates to true if `lhs` textually ends with `rhs`.
Otherwise, it is false.

==== CONTAINS

Using `lhs CONTAINS rhs` requires both `lhs` and `rhs` to be strings.
This new expression evaluates to true if `lhs` textually contains `rhs`.
Otherwise, it is false.

If any argument to `STARTS WITH`, `ENDS WITH`, or `CONTAINS` is `NULL`, then the result of evaluating the whole predicate is `NULL`.

It is a type error to use `STARTS WITH`, `ENDS WITH`, or `CONTAINS` with a value that is not a string.

=== Interaction with existing features

Provide details on any interactions that need to be considered.

=== Alternatives

List any alternatives here; e.g. new keywords, a smaller feature set etc.

== What others do

If applicable, include a feature comparison table, along with any useful links.

To provide a well-rounded comparison, please ensure the inclusion of at least one SQL-based implementation -- such as DB2 or Postgres -- as well as SPARQL.
If you require any assistance or pointers to the latter, please contact <EMAIL>.

== Benefits to this proposal

List the benefits here.

{'fraction_non_alphanumeric': 0.09002637257252458, 'fraction_numerical': 0.003356509230400384, 'mean_word_length': 3.8818022235225276, 'pattern_counts': {'":': 3, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3059854', 'n_tokens_mistral': 2478, 'n_tokens_neox': 2368, 'n_words': 1173}