Gosource.go -rw-r--r-- 353 B
1package main
2
3import "context"
4
5
6type Article struct {
7 raw string
8}
9
10// Return the source text separated by paragraphs
11func (a Article) Chunks() []string {
12 return []string{a.raw} // FIXME
13}
14
15// Article source
16type Source interface {
17 Name() string
18 Language() Language
19 Len(context.Context) (int, error)
20 Get(context.Context, int) (*Article, error)
21}