com.alecdorrington.annotatedtextformat

Members list

Type members

Classlikes

object AnnotatedText

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class AnnotatedText[+A]

A text with annotations, each attaching a value to some of its spans. Annotations may overlap and nest one another, but each has at least one span, and its own spans lie within the text, in order, none overlapping another.

A text with annotations, each attaching a value to some of its spans. Annotations may overlap and nest one another, but each has at least one span, and its own spans lie within the text, in order, none overlapping another.

Type parameters

A

The type of the annotations' values, specific to the application, such as a correction or a translation.

Value parameters

annotations

Its annotations.

text

The text annotated.

Attributes

Note

AnnotatedText.of makes one, checking that this holds.

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Annotation[+A](spans: List[TextSpan], value: A)

A value attached to spans of a text: one, as a word, or several, as the parts of a separable verb, or a span of words and the point to which they move. In an annotated text, it has at least one span, its spans are in order, and none overlaps another.

A value attached to spans of a text: one, as a word, or several, as the parts of a separable verb, or a span of words and the point to which they move. In an annotated text, it has at least one span, its spans are in order, and none overlaps another.

Type parameters

A

The type of the value, specific to the application, such as a correction or a translation.

Value parameters

spans

The spans to which the value is attached, in order, none overlapping another.

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Annotation.type
object JsonSchema

How the format's JSON Schemas are put together around the schema of an annotation's value, which JSON Schema, having no type parameters, cannot leave open.

How the format's JSON Schemas are put together around the schema of an annotation's value, which JSON Schema, having no type parameters, cannot leave open.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
JsonSchema.type
enum Problem

What keeps annotations from fitting a text.

What keeps annotations from fitting a text.

Attributes

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

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Problem.type
object TextSpan

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
TextSpan.type
final case class TextSpan(start: Int, end: Int)

A part of a text, from its start up to but excluding its end, counted in UTF-16 code units, as JavaScript's strings count them. Where they are equal, it is a point between two characters, as where text is to be inserted.

A part of a text, from its start up to but excluding its end, counted in UTF-16 code units, as JavaScript's strings count them. Where they are equal, it is a point between two characters, as where text is to be inserted.

Value parameters

end

Where it ends: how many UTF-16 code units of the text come before its end.

start

Where it begins: how many UTF-16 code units of the text come before it.

Attributes

Note

The JVM's strings and the DOM's ranges count alike.

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