Downloads · 30 days
0
NatLibFi/HogwartsSortingHat-fastText
HogwartsSortingHat-fastText is a text classification model from NatLibFi. Use it when you need a label for a piece of text. The card lists the license as cc-by-4.0.
The model is the output of this Annif tutorial exercise.
Downloads · 30 days
0
Access
Public
Updated Apr 19, 2024
Repo size
800 MB
Likes
0
Public
Click a slice to open those files.
.zip800 MB · 100%
From the Hugging Face model README
The model is the output of this Annif tutorial exercise.
The original Sorting Hat reads the thoughts of the student, but Annif generally does not have access to that kind of information, so we will simply use the name of the student as input. We will train a fastText model on the names of characters from the Harry Potter novels whose house is known. To make it possible to generalize the model to new, unseen names, we will use character n-grams to split all names into chunks of 1 to 4 characters - for example harry becomes [h, ha, har, harr, a, ar, arr, arry ...]. fastText can do this when given the minn and maxn parameters, which set the minimum and maximum length of character n-grams to generate from input text.