Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: First entry in each dictionary contains invisible '<feff>' unicode character in lemmatizer output #19

Open
ptdewey opened this issue Nov 1, 2024 · 1 comment

Comments

@ptdewey
Copy link

ptdewey commented Nov 1, 2024

When attempting to lemmatize a word that appears as the first entry in a dictionary file from the lists repo (https://github.com/michmech/lemmatization-lists), the resulting lemmatized word contains the invisibile unicode '<feff>' character.

image

For English this happens with 'first' and happens with 'primer' in Spanish. I haven't tested with any of the other dictionaries, but I suspect the issue will be present in all of them.

This behavior is replicable via the repo tests and results in the following failure:

func TestSpanishUsage(t *testing.T) {
	l, err := golem.New(New())
	if err != nil {
		fmt.Println(err)
	}
	_ = l
	word := l.Lemma("primer")
	fmt.Println(word)
	result := "1"
	if word != result {
		t.Errorf("Wanted %s, got %s.", result, word)
	}
}

image

@aaaton
Copy link
Owner

aaaton commented Nov 12, 2024

Thanks for the bug-report. I'll have a look at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants