Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GZipCorpusIterator ¶
type GZipCorpusIterator struct {
CorpusPath string
}
GZipCorpusIterator implements the TextCorpusIterator interface for gzip-compressed corpus files.
func NewGZipCorpusIterator ¶
func NewGZipCorpusIterator(corpusPath string) *GZipCorpusIterator
NewGZipCorpusIterator returns a new GZipCorpusIterator.
func (*GZipCorpusIterator) ForEachLine ¶
func (c *GZipCorpusIterator) ForEachLine(callback func(i int, text string))
ForEachLine calls the callback for each line of each regular file from the gzip archive.
type TextCorpusIterator ¶
type TextCorpusIterator interface { // ForEachLine calls the callback for each line of a corpus. // The index of the first line is 1. ForEachLine(callback func(i int, line string)) }
TextCorpusIterator is implemented by any value that has the ForEachLine method.
Click to show internal directories.
Click to hide internal directories.