Skip to content

bureaucratic-labs/conllu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoNLL-U GoDoc Build Status Go Report Card

CoNLL-U format parser for Go language.
For more info, see format specification on Universal Dependencies website

Installation

$ go get github.com/bureaucratic-labs/conllu

Usage

package main

import (
	"os"
	"fmt"
	"bufio"
	"github.com/bureaucratic-labs/conllu"
)

func main() {
	fd, _ := os.Open('path/to/corpora.conllu')
	rd := bufio.NewReader(fd)

	sentences, _ := conllu.Parse(rd)

	for i := 0; i < count; i++ {
		fmt.Println(fmt.Sprintf("%+v", sentences[i]))
	}
}