trainhal

package
v0.0.0-...-363a0e4 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTrainingInput

func ParseTrainingInput(r io.Reader, filename, mediaType string) ([]ghal.Sentence, error)

ParseTrainingInput attempts to extract sentences from the given byte stream by interpreting it as one of a number of text formats:

  • HTML
  • RSS or Atom with HTML body text
  • Markdown
  • Plain text

It uses the given optional filename and mimeType to guess which parser to use. If both are given, the mimeType has precedence. If neither filename nor mimeType are set then it will fail, returning an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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