Skip to content

matteo-grella/gophercon-eu-2021

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matteo Grella @ GopherCon Europe 2021

At GopherCon Europe 2021, Matteo Grella discussed the spaGO package, the first and only pure Go library that focuses on cutting-edge neural technologies for Natural Language Processing (NLP).

He gave some straightforward examples of how to use the library in his talk.

This repository contains those examples (and a few more) for integrating ML/NLP features and functionality into your Go programs.

Getting Started

Here is a list of available demos (each one has its own README):

You must download the pre-trained neural models before you run the demos.

For this purpose, you can use the following scripts, which handle the downloading and conversion of Flair and Hugging Face models.

Each model weighs about 2 Gb, so make sure you have enough space on your hard disk!

Flair models

Run the script:

./download_flair.sh models

Hugging Face models

This script uses the Hugging Face Model Importer tool provided by spaGO.

We provide you with a hf-importer binary compiled for Linux AMD64 in this repository.

Here's the command used to compile it from the spaGO sources:

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GOARCH=amd64 go build -ldflags="-extldflags=-static" -o hf-importer cmd/huggingfaceimporter/main.go

Alternatively, you can build it by yourself following the instructions in the spaGO repo.

Then, run the script:

./download_hf.sh models

Enjoy ;)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages