QuotedAnnotation

com.alecdorrington.annotatedtextformat.llm.QuotedAnnotation
See theQuotedAnnotation companion class

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def anchor[A](text: String, quoted: List[QuotedAnnotation[A]], matching: Matching = ...): Anchored[A]

quoted, anchored to text, as given in the order in which their passages begin. Each is placed by the first of these ways that finds it:

quoted, anchored to text, as given in the order in which their passages begin. Each is placed by the first of these ways that finds it:

  • where it first occurs from where the one before it began on, but not just where that one is, as a passage nested in it may begin where it does, but a word quoted again is a later occurrence;
  • else just where the one before it is, as two may annotate the same words;
  • else wherever it occurs only once, as a model may give one out of order, though where the search goes on from never moves back.

Within each way, the quote is sought as written before as loosely as matching allows, so that a correction of the case or spacing of a word lands on the word as written. Each part of a quote is found after the part before it, and a quote holding an ellipsis is first sought whole, as the text may hold one.

Attributes

def listSchema(value: Json): Json

The JSON Schema of a list of quoted annotations whose values conform to the schema value, as a model replies with, whose definitions are lifted to its root, as JsonSchema.around describes.

The JSON Schema of a list of quoted annotations whose values conform to the schema value, as a model replies with, whose definitions are lifted to its root, as JsonSchema.around describes.

Attributes

def parts(quote: String): List[String]

The parts of quote, split where an ellipsis, as … or ..., stands between spaces.

The parts of quote, split where an ellipsis, as … or ..., stands between spaces.

Attributes

def quote[A](annotated: AnnotatedText[A], matching: Matching = ...): List[QuotedAnnotation[A]]

The annotations of annotated, in the order in which they begin, quoted as a model would write them, each with as few words around it as anchor it back to where it is, as anchor finds it: none, unless the same words stand earlier where they would be found instead, and then a word or more either side, the passage marked between them. Each point is quoted with the word on either side of it, or more.

The annotations of annotated, in the order in which they begin, quoted as a model would write them, each with as few words around it as anchor it back to where it is, as anchor finds it: none, unless the same words stand earlier where they would be found instead, and then a word or more either side, the passage marked between them. Each point is quoted with the word on either side of it, or more.

An annotation that no quote within reach places back, as in a text repeating the same words further than eight words either side, or one holding caret, open or close itself, is quoted with as many words around it as may be, and may not anchor back; anchor tells which do not, by where it places them.

Attributes

def schema(value: Json): Json

The JSON Schema of a quoted annotation whose value conforms to the schema value, within a whole schema, to which the definitions of value belong, described by its Scaladoc.

The JSON Schema of a quoted annotation whose value conforms to the schema value, within a whole schema, to which the definitions of value belong, described by its Scaladoc.

Attributes

Concrete fields

val caret: Char

What marks a point in a quote.

What marks a point in a quote.

Attributes

val close: Char

What marks where the passage quoted among words around it ends.

What marks where the passage quoted among words around it ends.

Attributes

val open: Char

What marks where the passage quoted among words around it begins.

What marks where the passage quoted among words around it begins.

Attributes

val separator: String

What joins the parts of a quote.

What joins the parts of a quote.

Attributes

Givens

Givens

given given_Decoder_QuotedAnnotation: [A : Decoder] => Decoder[QuotedAnnotation[A]]
given given_Encoder_QuotedAnnotation: [A : Encoder] => Encoder[QuotedAnnotation[A]]

A quoted annotation as {"quote": ..., "value": ...}.

A quoted annotation as {"quote": ..., "value": ...}.

Attributes