Operationalizing a National Digital Library: The Case for a Norwegian Transformer Model
Paper • 2104.09617 • Published • 2
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("NbAiLab/nb-bert-base-pos")
model = AutoModelForTokenClassification.from_pretrained("NbAiLab/nb-bert-base-pos")Release 1.0 (November 6, 2024)
NB-Bert base model fine-tuned on the Part of Speech task using the NorNE dataset.
from transformers import pipeline
pos = pipeline("token-classification", "NbAiLab/nb-bert-base-pos")
example = "Jeg heter Kjell og bor i Oslo."
pos_results = pos(example)
print(ner_results)
More on https://arxiv.org/abs/2104.09617
Quantized
Base model
NbAiLab/nb-bert-base
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="NbAiLab/nb-bert-base-pos")