# Bokmål tagset (data/no/words/tagset.txt)

This is the description of the tags used by the Norwegian (Bokmål) tagger.

---
The Bokmål tagger dictionary (data/no/dictionaries/no_pos.dict) is generated
by tools/no-dict/build-no-tagger.py from the Ordbøkene open data
(Bokmålsordboka; Ordbanken / Nasjonalbiblioteket + Språkbanken, University of
Bergen library):

  https://ord.uib.no/bm/fil/lemma_expanded.json   (lemmas + inflected forms)
  https://ord.uib.no/bm/fil/inflection_tags.json (grammatical categories per form slot)
  https://ord.uib.no/bm/fil/word_class.json      (word classes)

License: CC BY 4.0 (Ordbanken/Ordbøkene), the same source as the vendored
hunspell/nb_NO.dic. The download is cached under /tmp; only the generated
dictionary products are vendored into data/.

The tagset follows the Stavekontrolden style of the Danish and Nordum taggers
(data/da/words/tagset.txt, data/nrd/words/tagset.txt): 3-letter part-of-speech
codes with colon-separated feature suffixes. The features are derived from
what Ordbøkene exposes in its inflection tables:

- nouns (substantiv): number (sin/plu) x definiteness (ube/bes). Gender is
  deliberately NOT encoded: Ordbøkene frequently lists both the masculine
  (-en) and feminine (-a) definite form for one lemma (jenta/jenten), so a
  per-reading gender would be unreliable. The definite FORM itself carries
  the gender signal (bilen vs huset), which is what the built-in
  NB_EN_ET_GENDER heuristic uses.
- verbs (verbum): tense/mood of the tagged form (inf, præ, dat, imp, kor,
  lan). The Ordbøkene verb templates include periphrastic passive forms
  (bøyes med "bli"/"vert" and s-passive); only the simple finite, infinitive,
  imperative, participle and present-participle slots are tagged (the
  <PerfPart> slot itself is tagged ver:kor; its adjectival uses are already
  covered by the adjective readings of the same form where applicable).
  The s-passive slots (Inf+Pass "løpes", Pres+Pass "løpes"; and the whole
  VERB_sPass paradigms) carry their tense with NO separate passive marker:
  "løpes" carries both ver:inf (infinitiv passiv) and ver:præ (presens
  passiv) readings. Danish (data/da/words/tagset.txt) distinguishes
  ver:<tense>:pas, but here the distinction would buy no rule expressiveness
  (every verb filter matches the flat `ver:.*` namespace or a tense
  enumeration that the passive readings legitimately belong to), while the
  flat tags keep the genuine tense ambiguity of the s-forms visible to the
  disambiguator. Revisit only if a rule ever needs to exclude passives.
- adjectives (adjektiv): pos (positive), kom (comparative), sup (superlative),
  with pos:BF (bestemt form) for the Ordbøkene Pos+Def+Sing and Pos+Plur
  slots — the "-e" forms ("den store bilen", "store biler") — and pos:neu
  for the Pos+Neuter slot ("fint"), which the templates distinguish from
  the positive indefinite masc/fem (lemma) slot. Surfaces whose neuter
  equals the bare form (fornøyd, moderne, the invariant glad/lite/såkalt
  class) carry BOTH the adj:pos and the adj:pos:neu reading, and lemmas
  with no distinct neuter slot double the bare form as adj:pos:neu, so the
  NB_NEUTER_T agreement rule can tell the forms apart. Defective lemmas
  with no bestemt-form slot (indre/øvre/verre) lose the bare adj:pos
  reading (the -e agreement rules must not flag what has no corrected
  form to suggest).
- the remaining word classes have no features.

The engine tags words by returning one string per reading, for example:

 linjer	linje	sub:ube:plu
 linjene	linje	sub:bes:plu
 løper	løpe	ver:præ
 løpt	løpe	ver:kor

Rules match with postag regular expressions, e.g. all verbs:

 <token postag_regexp="yes" postag="ver:.*" />

or plural nouns:

 <token postag_regexp="yes" postag="sub:.*:plu" />

Part-of-speech tags (Ordbøkene word class -> tag; word_class.json terms):

sub	NOUN	substantiv (noun); features:
	ube/bes (ubestemt/bestemt: indefinite/definite),
	sin/plu (singularis/pluralis: singular/plural)
	templates (inflection_tags.json): Sing/Ind, Sing/Def, Plur/Ind, Plur/Def
ver	VERB	verb; features:
	inf (infinitiv), præ (presens), dat (preteritum),
	imp (imperativ), kor (perfektum partisipp), lan (presens partisipp)
adj	ADJ	adjektiv; features:
	pos (positiv), kom (komparativ), sup (superlativ)
pron	PRON	pronomen (no features)
det	DET	determinativ (incl. DET_Q tallord); the adjectival determiners
	(DET_adj: annen/annet/andre ...) carry the plain det reading on every
	form (the template's form/gender slots are not encoded)
num	DET_Q	tallord (tagged det, see above)
adv	ADV	adverb (incl. ADV_adj comparative forms: gjerne/heller/helst)
prep	ADP	preposisjon
kon	CCONJ	konjunksjon (sideordnende)
skon	SCONJ	subjunksjon (underordnende)
int	INTJ	interjeksjon
pro	PROPN	egennavn
infm	INFM	infinitivsmerke (å)

Not tagged (no rule-relevant readings; kept out of the tagger dictionary):
ABBR (forkorting), SYM (symbol), EXPR (uttrykk, multi-word), PFX/SFX/COMPPFX/
VSTEM (prefix/suffix/compound stems), UNKN.

The uninflected word classes (pron, prep, kon, skon, int, infm and the
uninflected DET_simple) are tagged with the bare POS code (no features).

Feature values:

ube	ubestemt	indefinite
bes	bestemt	definite
sin	singularis	singular
plu	pluralis	plural
inf	infinitiv
præ	præsens
dat	præteritum
imp	imperativ
kor	perfektum partisipp (supine/-t/-tt form)
lan	præsens partisipp (-ende)
pos	positiv	1st degree
pos:BF	positiv bestemt form	1st degree, definite singular/plural (-e form)
pos:neu	positiv intetkjønn	1st degree, neuter ("fint"; the bare form doubles as the neuter when Ordbøkene lists no distinct slot)
kom	komparativ	2nd degree
sup	superlativ	3rd degree
