func (m *margopher) parse(text string) {
	m.states = make(map[[2]string][]string)
	words := strings.Split(text, " ")
	for i := 0; i < len(words)-2; i++ {
		prefix := [2]string{words[i], words[i+1]}
		if _, ok := m.states[prefix]; ok {
			m.states[prefix] = append(m.states[prefix], words[i+2])
		} else {
			m.states[prefix] = []string{words[i+2]}
		}
	}
}
Parse input text into states map
package margopher
import (
	"bytes"
	"github.com/PuerkitoBio/goquery"
	"io/ioutil"
	"log"
	"math/rand"
	"os"
	"regexp"
	"strings"
)
type margopher struct {
	states map[[2]string][]string
}
func New() *margopher {
	return &margopher{}
}
func (m *margopher) ReadText(text string) string {
	m.parse(text)
	return m.generate()
}
func (m *margopher) ReadFile(filePath string) string {
	file, err := os.Open(filePath)
	if err != nil {
		log.Fatal(err)
	}
	text, err := ioutil.ReadAll(file)
	if err != nil {
		log.Fatal(err)
	}
	m.parse(string(text))
	return m.generate()
}
func (m *margopher) ReadURL(URL string) string {
	doc, err := goquery.NewDocument(URL)
	if err != nil {
		log.Fatal(err)
	}
	doc.Find("article").Each(func(i int, s *goquery.Selection) {
		text := s.Find("p").Text()
		m.parse(text)
	})
	return m.generate()
}
func (m *margopher) StateDictionary() map[[2]string][]string {
	return m.states
}