Technical Reference
for Curveship-js
spin
An associative array representing the particular “spin” a narrator puts on a story, and thus defining several things about how it is told. spin is defined in narrator files with lines such as:
spin.timeWords = true;
Valid keys and the type of data that can be assigned as values are:
- spin.i = STRING;
- The “I” of the story. STRING is an Existent’s tag, e.g., "john" or "cinderella"
- spin.eventNumbers = BOOLEAN;
- Should the Events that are represented be numbered according to their position in the underlying sequence? Setting this to true can be useful during the authoring/development of a variable narrative.
- spin.expressionNumbers = BOOLEAN;
- Should the expressions (the representations of Events as they end up in the final narrative) be numbered? Setting this to true can be useful during the authoring/development of a variable narrative.
- spin.groupings = STRING;
- How should Existents be grouped when several of them are represented at once? The string consists of zero or more of “categories” “properties” and “parts” with a space between words if there are two or three.
- spin.main = STRING;
- What Events will be included in the main narrative sequence? This key/value pair allows ellipsis. Values can be lists of numbers or number ranges placed in a string and with each element separated by semicolons, e.g., "0,5,7-12" or "3-8". Note that the first Event in the sequence is numbered 0.
- spin.order = STRING;
- What is the order in which those underlying Events that are included in the main narrative sequence will be narrated? Values can be "chronological" "random" or "retrograde" (meaning to tell the last event first and proceed backwards through them).
- spin.timeWords = BOOLEAN;
- Should phrases like “Previously, ” be prepended when an Event is narrated that happens earlier than the last narrated Event?
- spin.referring = STRING;
- This key/value pair is used internally and should not be set. It indicates (in Hans Reichenbach’s theory of tense and aspect) the time of reference.
- spin.speaking = STRING || NUMBER;
- What is the time of speaking or time of narrating? Values can be "before" "during" or "after" for the narrator to speak from a point in time before the Events, to follow along through each of the events (in “vivid narrative”), or to speak from a point in time after the Events. A number can be specified if the narrator should be speaking from some point in the middle of the underlying action. This number can be an integer or can end in “.5” if the narrator. For instance, if 6.5 is given the narrator will speak from a point in time between events 6 and 7.
- spin.you = STRING;
- The “you” of the story. STRING is an Existent’s tag, e.g., "john" or "cinderella"
Names and ProperNames for Existents
Names(initial, subsequent, pronouns)
initial is required and specifies the name used for a particular Existent on first reference.
subsequent is optional. If included, this name will be used on second reference and all other references. If omitted or if null
is given as the value, Curveship-js will determine what noun phrase to use based on the initial name. If the initial name is “a chicken,” for instance, subsequent references will be to “the chicken.” The initial/subsequent distinction allows authors to include a longer, descriptive name on first reference and an abbreviated name thereafter — for instance, “a big bad wolf” and “the wolf.”
pronouns is an optional argument. A pronoun set such as pronouns.masculine or pronouns.nonBinary can be used here. If omitted or set to null
, Curveship-js will use information from the underlying story (in the story file) to determine what pronouns should be used by the particular narrator.
ProperNames(given, family, pronouns, common, title, possessive)
given is required and specifies the first name used for a particular Existent. This is an Actor’s first name or, if the actor has a mononym such as Sting, Logic, or Grimes, the Actor’s only name: ProperNames("Grimes")
. A value must be provided, but an Actor who does not have a first name, or whose first name is unknown to a particular narrator, can have null
set for this argument. Note, however, that it wouldn’t be sensible to use ProperNames without specifying any of the arguments. You would only set given to null
if you were going to set family to a string value.
family is optional and specifies the family name used for a particular Existent.
pronouns is an optional argument. A pronoun set such as pronouns.masculine or pronouns.nonBinary can be used here. If omitted or set to null
, Curveship-js will use information from the underlying story (in the story file) to determine what pronouns should be used by the particular narrator.
common is an optional argument. specifying the common name for an Actor who also has a proper name, e.g. “a butler” for an Actor whose given name is “Jeeves.” In the current version of Curveship, 0.4, is is not used, but it is provided for future versions of the system in which a narrator may switch between using proper and common names.
title is a courtesy title such as Ms. or Dr., which can be abbreviated or spelled out. The title can be used even if the Actor does not have a given name, as with Mr. Watt from Samuel Beckett’s second novel or Lady Gaga: ProperNames(null, "Watt", null, null, "Mr.")
and ProperNames(null, "Gaga", null, null, "Lady")
.
possessive will only be used in rare cases. It is for a custom possessive adjective, which in English only applies to certain Biblical and classical figures whose names end in ‘s’. To correctly produce the possessive of Moses, for instance, this needs to be set as “Moses’” — note, however, that most names ending in ‘s’, such as that of Jorge Luis Borges and Harry Mathews, do not follow this rule, and Curveship-js will correctly generate their possessive adjectives, “Borges’s” and “Mathews’s.”
VerbPh Representations for Events
VerbPh(base)
In the simplest case the base argument is simply the uninflected base form of a verb, such as “sing” or “jump.”
The uninflected, base form of a verb should always be the first word in base. If you use “looked,” “saw,” or some other form of the verb, Curveship-js won’t be able to conjugate it properly.
The value base can also be set to be a longer phrase, such as a verb + preposition (“wake up,” “get down,” “talk to”) or a verb + infinitive (“decide to tell,” “fail to lift”). However the VerbPh should never include anything, other than the first word, that needs to be conjugated or otherwise inflected under any circumstances.
It also should not include a direct or indirect object. If you use “notice the rabbit” as a VerbPh for one Event and “wave to the rabbit” as a VerbPh for the next one, Curveship-js won’t be able to do its natural language generation work. The rabbit should be introduced as “a rabbit” and might be pronominalized when the second event is represented. To allow Curveship-js to do its work, direct or indirect objects should be defined as Existents and the corresponding Events should be set up with the right number of arguments.