niall

package module
v0.0.0-...-51a5e2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2020 License: GPL-2.0 Imports: 3 Imported by: 1

README

niall

This is a Go package, which uses C code from gNiall.

Niall attempts to learn whichever language you try to teach it, and can then output text.

Think of it as poor man's GPT-2.

Example

The following poem was generated by the included poem generator:

Never Was The Tender Interspace
-------------------------------

That were painted all delight.
Ah that when the other side.
Was made sleep not this.
Thou knowest that all the shut mouth an almsgiving.
It sleep not find in the winds on a child of mine.
Her was a secret bird.
O loves truth or any of heaven hereafter.

Lie still fret thee.
Sweeter far than the soft raiment of doves that mourn now.
Made a thought in her fair kiss.
Does the days when the green lands name that hold delight.
The place where they are the hollow bosom is unquieter yet than wine.
And amber on earth may sing.
For a thorns wound smart.

Was clothed with love lay upon the flesh to death.
Both sides drawn fully back.
But as the soul of dreams through its trees as grapeflowers hold their garment of death.
Never a season and covered things heard.
Sound of lips of her eyes.
Each his wings and sheaves.
Thou shalt not why should it never forth such notes.

General Information

  • License: GPL2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WarningFunction = fmt.Println
	ErrorFunction   = fmt.Println
	PrintFunction   = fmt.Println
)

Functions

func CorrectSpelling

func CorrectSpelling(original, correct string)

Correct the spelling

func Init

func Init()

This seeds the random number generator and clears the dictionary

func Learn

func Learn(s string)

Make Niall learn from a string

func ListDictionary

func ListDictionary()

List the contents of the dictionary

func LoadDictionary

func LoadDictionary(filename string)

Load the dictionary from file

func NewDictionary

func NewDictionary()

Clear the dictionary

func Quit

func Quit()

This frees the allocated memory

func SaveDictionary

func SaveDictionary(filename string)

Save the dictionary to file

func Talk

func Talk() string

Make Niall say something

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL