Skip to content
A lemmatizer implemented in Go
Go Makefile
Branch: master
Clone or download
Latest commit 995cd80 May 28, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dicts fix: delete dicts/sv/sv.go May 28, 2019
.gitattributes feat: prebuilt gob-files for faster loading (#12) May 28, 2019
.gitignore feat: prebuilt gob-files for faster loading (#12) May 28, 2019
LICENSE feat: added MIT license Mar 13, 2019
Makefile feat: prebuilt gob-files for faster loading (#12) May 28, 2019
README.md
go.mod feat: prebuilt gob-files for faster loading (#12) May 28, 2019
go.sum feat: prebuilt gob-files for faster loading (#12) May 28, 2019
golem.go feat: prebuilt gob-files for faster loading (#12) May 28, 2019
golem_test.go feat: prebuilt gob-files for faster loading (#12) May 28, 2019

README.md

GoLem

This project is a dictionary based lemmatizer written in pure go, without external dependencies.

What?

A lemmatizer is a tool that finds the base form of words.

Lang Input Output
English aligning align
Swedish sprungit springa
French abattaient abattre

It's based on the dictionaries found on michmech/lemmatization-lists, which are available under the Open Database License. This project would not be feasible without them.

Languages

At the moment golem supports English, Swedish, French, Spanish, Italian & German, but adding another language should be no more trouble than getting the dictionary for that language. Some of which are already available on lexiconista. Please let me know if there is something you would like to see in here, or fork the project and create a pull request.

Basic usage

package main

import (
	"github.com/aaaton/golem"
	"github.com/aaaton/golem/dicts/en"
)

func main() {
	// the language packages are available under golem/dicts
	// "en" is for english
	lemmatizer, err := golem.New(en.New())
	if err != nil {
		panic(err)
	}
	word := lemmatizer.Lemma("Abducting")
	if word != "abduct" {
		panic("The output is not what is expected!")
	}
}

Contributors

  • axamon
  • charlesgiroux
  • glaslos
You can’t perform that action at this time.