Documentation ¶
Overview ¶
package composer converts brevity responses from structured forms into natural language.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PronounceBearing ¶
PronounceBearing composes a text representation ofbearing.
func PronounceDecimal ¶
PronounceFractional composes a text representation of the given float as a sequence of digits.
func PronounceInt ¶
PronounceInt composes a text representation of a a sequence of digits, using aviation pronunciation. 4 is pronounced "fower", 8 is pronounced "ait", and 9 is pronounced "niner".
func PronounceNumbers ¶
PronounceNumbers composes a text representation of the digits in the given string as a sequence of digits. Non-digit characters are ignored.
Types ¶
type Composer ¶
type Composer interface { // ComposeAlphaCheckResponse constructs natural language brevity for responding to an ALPHA CHECK. ComposeAlphaCheckResponse(brevity.AlphaCheckResponse) NaturalLanguageResponse // ComposeBogeyDopeResponse constructs natural language brevity for responding to a BOGEY DOPE call. ComposeBogeyDopeResponse(brevity.BogeyDopeResponse) NaturalLanguageResponse // ComposeDeclareResponse constructs natural language brevity for responding to a DECLARE call. ComposeDeclareResponse(brevity.DeclareResponse) NaturalLanguageResponse // ComposeFadedCall constructs natural language brevity for announcing a contact has faded. ComposeFadedCall(brevity.FadedCall) NaturalLanguageResponse // ComposeNegativeRadarContactResponse constructs natural language brevity for saying the controller cannot find a contact on the radar. ComposeNegativeRadarContactResponse(brevity.NegativeRadarContactResponse) NaturalLanguageResponse // ComposePictureResponse constructs natural language brevity for responding to a PICTURE call. ComposePictureResponse(brevity.PictureResponse) NaturalLanguageResponse // ComposeRaygunResponse constructs natural language brevity for responding to a RADIO CHECK. ComposeRadioCheckResponse(brevity.RadioCheckResponse) NaturalLanguageResponse // ComposeSnaplockResponse constructs natural language brevity for responding to a SNAPLOCK call. ComposeSnaplockResponse(brevity.SnaplockResponse) NaturalLanguageResponse // ComposeSpikedResponse constructs natural language brevity for responding to a SPIKED call. ComposeSpikedResponse(brevity.SpikedResponse) NaturalLanguageResponse // ComposeSunriseCall constructs natural language brevity for announcing GCI services are online. ComposeSunriseCall(brevity.SunriseCall) NaturalLanguageResponse // ComposeThreatCall constructs natural language brevity for announcing a threat. ComposeThreatCall(brevity.ThreatCall) NaturalLanguageResponse // ComposeSayAgainResponse constructs natural language brevity for asking a caller to repeat their last transmission. ComposeSayAgainResponse(brevity.SayAgainResponse) NaturalLanguageResponse // ComposeTripwireResponse constructs natural language brevity for educating a caller about threat monitoring. ComposeTripwireResponse(brevity.TripwireResponse) NaturalLanguageResponse }
Composer converts brevity responses from structured forms into natural language. It is nondeterministic; the same input may randomly produce different output, to add variety and personality to the bot's respones.
type NaturalLanguageResponse ¶
type NaturalLanguageResponse struct { // Subtitle is how the response will be displayed as in-game text. Subtitle string // Speech is the input to the TTS provider. Speech string }
NaturalLanguageResponse contains the composer's responses in text form.