How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("token-classification", model="johl/fi-case-detection-finbert")
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("johl/fi-case-detection-finbert")
model = AutoModelForTokenClassification.from_pretrained("johl/fi-case-detection-finbert", device_map="auto")
Quick Links

Finnish grammatical case detection

This model predicts the correct grammatical case for words in Finnish sentences. It can figure out the best-fitting case whether the target token is an uninflected base word or a masked placeholder.

Related code: https://github.com/joh17/case-detection

Related research publication: https://aclanthology.org/2026.sigtyp-main.1/

The repository includes:

  • Inference code, which outputs predictions and generates the fully inflected sentence
  • Training code

List of the 14 target case labels, with the word talo (house) used as example:

Label Case name Example Rough meaning
Nom Nominative talo house
Gen Genitive talon of the house
Part Partitive taloa (some) house
Ine Inessive talossa in the house
Ela Elative talosta out of the house
Ill Illative taloon into the house
Ade Adessive talolla at the house
Abl Ablative talolta from the house
All Allative talolle to the house
Ess Essive talona as a house
Tra Translative taloksi into a house
Abe Abessive talotta without a house
Ins Instructive taloin by means of houses
Com Comitative taloineen with houses
Downloads last month
7
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for johl/fi-case-detection-finbert

Finetuned
(4)
this model

Collection including johl/fi-case-detection-finbert