Skip to content
Ocean6Documentation
DocsBuild
Reference 0.2Updated 19 Sep 2026

Local task specification

On this page

The input is a JSON object with exactly five fields. The local runtime performs explicit validation rather than invoking a general JSON Schema engine. Its structural schema uses JSON Schema Draft 2020-12. [S1]

Swipe or scroll to view all columns →

FieldTypeConstraint
versionStringExactly "0.2"
operationStringExactly "literal-line-search"
documentStringValid Unicode scalar text; 1 to 20,000 UTF-8 bytes
termsArray of strings1 to 16 entries; each raw term contains 1 to 80 Unicode code points
top_kInteger-valued JSON number1 to 10; booleans are rejected
Additional fieldsNot permittedMissing or unknown fields fail validation

Normalization and ranking#

  1. Reject isolated Unicode surrogate code points. Convert CRLF and CR line endings to LF before splitting the document. Line numbering begins at 1; empty lines retain their positions.
  2. Reject a term containing CR or LF. Trim only leading and trailing ASCII spaces and tabs, then fold ASCII A through Z to lowercase. Reject empty normalized terms and remove duplicates in first-occurrence order.
  3. Match each normalized term as a literal substring of each line after ASCII case folding. Other scripts remain literal. There is no tokenization, Unicode normalization or language-dependent case folding.
  4. Set score to the number of distinct normalized terms matched in the line. Sort by descending score, then ascending original line number. Return at most top_k entries.

Input parsing#

JSON object member names must be unique for interoperable input. The Python parser rejects duplicates; the browser editor uses native JSON.parse, which retains the last duplicate. Python also rejects nonstandard NaN and Infinity constants.

The schema cannot by itself enforce the UTF-8 byte limit or the nonempty-after-trimming rule. A schema-valid object can still fail runtime validation. The CLI limits the complete task file to 150,000 bytes, separately from the 20,000-byte document limit.

Documentation 1.1 · Software reference 0.2
Download PDFDeveloper packageWord editionView Markdown

Search across all 30 chapters.

Use Tab to navigate results and Enter to open a chapter.
Documentation v1.1 · EN
Open task lab ↗Ocean6 website ↗