QuotedAnnotation

com.alecdorrington.annotatedtextformat.llm.QuotedAnnotation
See theQuotedAnnotation companion object
final case class QuotedAnnotation[+A](quote: String, value: A)

An annotation of a text as a large language model writes one: by quoting the passage it annotates, rather than by counting its characters, which models do badly. The annotations of a text are given in the order in which their passages begin.

Value parameters

quote

The passage annotated, quoted exactly as the text writes it. Where other words split the passage, as they may a separable verb, its parts are quoted in order, joined by " … ", a space either side, as in "stehe … auf". A point between two characters, as where words belong, is quoted as a word or two around it with "‸" at the point, as in "is ‸late"; those words are not themselves annotated. Where the passage could be taken for the same words elsewhere, a word or two around it are quoted too, and the passage itself is marked with "⟦" and "⟧", as in "the ⟦cat⟧ sat". A part may hold a point or a marked passage, but not both.

Attributes

Note

Its value has no description here, so that a schema for it keeps its own type's. The marks in the quote's description are QuotedAnnotation.separator, QuotedAnnotation.caret, QuotedAnnotation.open and QuotedAnnotation.close.

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def map[B](transform: A => B): QuotedAnnotation[B]

It, with transform applied to its value.

It, with transform applied to its value.

Attributes

def parts: List[String]

The parts of its quote, in order.

The parts of its quote, in order.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product