# -*- cg-pre-pipe: "$GTHOME/giella-core/scripts/preprocess --abbr=$GTHOME/langs/sme/tools/preprocess/abbr.txt | hfst-optimised-lookup $GTHOME/langs/sme/src/analyser-disamb-gt-desc.hfstol | $GTHOME/giella-core/scripts/lookup2cg" -*-
# Divvun & Giellatekno - open source grammars for Sámi and other languages
# Copyright © 2000-2023 UiT The Arctic University of Norway
# http://giellatekno.uit.no & http://divvun.no
#
# This program is free software; you can redistribute and/or modify
# this file under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or"# (at your option) any later version. The GNU General Public License
# is found at http://www.gnu.org/licenses/gpl.html. It is
# also available in the file $GTHOME/LICENSE.txt.
#
# Other licensing options are available upon request, please contact
# giellatekno@uit.no or feedback@divvun.no
# ==================================================================== #
# N O R T H E R N S Á M I D I S A M B I G U A T O R
# ==================================================================== #
# ====================================================================
# Sámi language technology 2003-2023, UiT The Arctic University of Norway #
# HOW TO TEST:
# ============
# lang-sme/tools/analysers/modes/trace-sme-analyser-dev.mode
# =========================================== #
# Short table of contents #
# =========================================== #
# Delimiters
# Tags and sets
# Disambiguation rules
# One-cohort disambiguation - cycle 0
# Local disambiguation - cycles 1 and 2
# Cycle 1a: Special cases
# Cycle 1b: Cleaning up after the special cases
# Cycle 2: Other local disambiguation
# Mapping of COMP-CS<, CC and CS
# More diambiguation
# Verb mappings
# Disambiguating nouns
# Mainly mapping-rules
# Disambiguating nouns
# Case disambiguation
# Cycle 3: Global disambiguation
# Cycle 4: Syntactic disambiguation
# Cycle 5: Post-syntactic morphological disambiguation
# =============== #
#!! # DELIMITERS
# =============== #
DELIMITERS = "<.>" "" ">" "<...>" "<¶>" "<..>" "" ".>" "<¶.>" "<❡>" (sent) sent ;
#!! Sentence delimiters are the following: <.> > <...> <¶>
#PARENTHESES = "<$(>" "<$)>" "<$[>" "<$]>" "<${>" "<$}>" "<$«>" "<$»>" ;
# ================== #
#!! # TAGS AND SETS
# ================== #
SETS
#!! ## Tags
#!! This section lists all the tags inherited from the fst, and used as tags
#!! in the syntactic analysis. The next section, **Sets**, contains sets defined
#!! on the basis of the tags listed here, those set names are not visible in the output.
# Tags declared as single-membered LISTs
# ======================================
#!! ### Beginning and end of sentence
LIST BOS = (>>>) () (sent) ; #!! BOS
LIST EOS = (<<<) () (sent) ("❡") ("¬") ; #!! EOS
# We define end of clause and beginning of clause in a way so that the file
# may be read both by the CG-2 and the vislcg formalisms.
# CG3 doesn´t function without >>> and <<< !
#!! ### Parts of speech tags
LIST N = N ; #!! * N
LIST A = A ; #!! * A
LIST Adv = Adv ; #!! * Adv
LIST V = V ; #!! * V
LIST Pron = Pron ; #!! * Pron
LIST CS = CS ; #!! * CS
LIST CC = CC ; #!! * CC
SET CC-CS = CC OR CS ; #!! * SET CC-CS = CC OR CS ;
LIST Po = Po ; #!! * Po
LIST Pr = Pr ; #!! * Pr
LIST Pcle = Pcle ; #!! * Pcle
LIST Num = Num ; #!! * Num
LIST Interj = Interj ; #!! * Interj
LIST ABBR = ABBR ; #!! * ABBR
LIST ACR = ACR ; #!! * ACR
LIST CLB = CLB clb ; #!! * CLB clb (clb lagt til for apertium, fungerer ikke uten)
LIST LEFT = LEFT ; #!! * LEFT
LIST RIGHT = RIGHT ; #!! * RIGHT
LIST WEB = WEB ; #!! * WEB
LIST PPUNCT = LEFT RIGHT PUNCT guio ; #!! * LEFT RIGHT because of apertium
LIST QMARK = """ ; # " syntax colouring reset.
SET PUNCT = PPUNCT - QMARK ;
LIST DASH = "–" "—" "-" ;
LIST COMMA = "," ;
LIST ¶ = ¶;
LIST HEADLINEMARK = "❡" ":" ;
#LIST V* = V* ;
#!! * ### Tags for POS sub-categories
LIST Pers = Pers ; #!! * Pers
LIST Dem = Dem ; #!! * Dem
LIST Interr = Interr ; #!! * Interr
LIST Indef = Indef ; #!! * Indef
LIST Recipr = Recipr ; #!! * Recipr
LIST Refl = Refl ; #!! * Refl
LIST Rel = Rel ; #!! * Rel
LIST Coll = Coll ; #!! * Coll
LIST NomAg = NomAg ; #!! * NomAg
LIST G3 = G3 ; #!! * G3
LIST Prop = Prop np ; #!! * Prop
LIST Allegro = Allegro ; #!! * Allegro
LIST Arab = Arab ; #!! * Arab
LIST Rom = Rom ; #!! * Romertall
LIST Subqst = Subqst ; #!! * Subqst
LIST CLBfinal = CLBfinal ; #!! * CLBfinal
#!! * ### Tags for morphosyntactic properties
LIST Nom = Nom ; #!! * Nom
LIST Acc = Acc ; #!! * Acc
LIST Gen = Gen ; #!! * Gen
LIST Ill = Ill ; #!! * Ill
LIST Loc = Loc ; #!! * Loc
LIST Com = Com ; #!! * Com
LIST Ess = Ess ; #!! * Ess
LIST Sg = Sg ; #!! * Sg
LIST Du = Du ; #!! * Du
LIST Pl = Pl ; #!! * Pl
LIST Cmp/SplitR = Cmp/SplitR ; #!! * Cmp/SplitR
LIST Cmp/Attr = Cmp/Attr ; #!! * Cmp/Attr
LIST Cmp/Cit = Cmp/Cit ; #!! * Cmp/Cit
LIST Cmpnd = Cmpnd ; #!! * Cmpnd
LIST Cmp/SgNom = Cmp/SgNom ; #!! * Cmp/SgNom Cmp/SgGen
LIST Cmp/SgGen = Cmp/SgGen ; #!! * Cmp/SgGen
LIST Cmp/PlGen = Cmp/PlGen ; #!! * Cmp/PlGen
LIST Cmp/Sh = Cmp/Sh ; #!! * Cmp/Sh
LIST Cmp = Cmp ; #!! * Cmp
LIST PxSg1 = PxSg1 ; #!! * PxSg1
LIST PxSg2 = PxSg2 ; #!! * PxSg2
LIST PxSg3 = PxSg3 ; #!! * PxSg3
LIST PxDu1 = PxDu1 ; #!! * PxDu1
LIST PxDu2 = PxDu2 ; #!! * PxDu2
LIST PxDu3 = PxDu3 ; #!! * PxDu3
LIST PxPl1 = PxPl1 ; #!! * PxPl1
LIST PxPl2 = PxPl2 ; #!! * PxPl2
LIST PxPl3 = PxPl3 ; #!! * PxPl3
LIST Der/Comp = Der/Comp ; #!! * Der/Comp
LIST Der/Superl = Der/Superl ; #!! * Der/Superl
LIST Comp = Comp Der/Comp Gram/Comp ; #!! * Gram/Comp for adverbs, Der/Comp for adverbs
LIST Superl = Superl Der/Superl Gram/Superl ; #!! * Gram/Superl for adverbs, and Der/Superl for adjectives
LIST Attr = Attr ; #!! * Attr
LIST Ord = Ord ; #!! * Ord
LIST Qst = Qst ; #!! * Qst
LIST IV = IV ; #!! * IV
LIST TV = TV ; #!! * TV
LIST Prt = Prt; #!! * Prt
LIST Prs = Prs ; #!! * Prs
LIST Ind = Ind ; #!! * Ind
LIST Pot = Pot ; #!! * Pot
LIST Cond = Cond ; #!! * Cond
LIST Imprt = Imprt ; #!! * Imprt
LIST ImprtII = ImprtII ; #!! * ImprtII
LIST Sg1 = Sg1 (p1 sg) ; #!! * Sg1
LIST Sg2 = Sg2 (p2 sg) ; #!! * Sg2
LIST Sg3 = Sg3 (p3 sg) ; #!! * Sg3
LIST Du1 = Du1 (p1 du) ; #!! * Du1
LIST Du2 = Du2 (p2 du) ; #!! * Du2
LIST Du3 = Du3 (p3 du) ; #!! * Du3
LIST Pl1 = Pl1 (p1 pl) ; #!! * Pl1
LIST Pl2 = Pl2 (p2 pl); #!! * Pl2
LIST Pl3 = Pl3 (p3 pl); #!! * Pl3
LIST Inf = Inf ; #!! * Inf
LIST ConNeg = ConNeg ; #!! * ConNeg
LIST Neg = Neg ; #!! * Neg
LIST PrfPrc = PrfPrc ; #!! * PrfPrc
LIST VGen = VGen ; #!! * VGen
LIST PrsPrc = PrsPrc ; #!! * PrsPrc
LIST Ger = Ger ; #!! * Ger
LIST Sup = Sup ; #!! * Sup
LIST Actio = Actio ; #!! * Actio
LIST VAbess = VAbess ; #!! * VBAbess
LIST Known = Known ; #!! * Known
LIST sentinit = sentinit ; #!! * sentinit
LIST org = org ;
# The ("ge" Pcle) etc. are used in Apertium
#!! * ### Tags for clitic particles
LIST Foc/Neg-ge = Foc/Neg-ge ; #!! * Foc/ge
LIST Foc/Pos-ge = Foc/Pos-ge ; #!! * Foc/ge
LIST Foc/ge = Foc/Pos-ge Foc/Neg-ge ; #!! * Foc/ge
LIST Foc/gen = Foc/gen ; #!! * Foc/gen
LIST Foc/ges = Foc/ges ; #!! * Foc/ges
LIST Foc/gis = Foc/gis ; #!! * Foc/gis
LIST Foc/naj = Foc/naj ; #!! * Foc/naj
LIST Foc/ba = Foc/ba ; #!! * Foc/ba
LIST Foc/be = Foc/be ; #!! * Foc/be
LIST Foc/hal = Foc/hal ; #!! * Foc/hal
LIST Foc/han = Foc/han ; #!! * Foc/han
LIST Foc/bat = Foc/bat ; #!! * Foc/bat
LIST Foc/son = Foc/son ; #!! * Foc/son
LIST Foc/mis = Foc/mis ; #!! * Foc/mis
LIST Foc/mat = Foc/mat ; #!! * Foc/mat
#!! * ### Derivation tags
LIST Der/PassL = Der/PassL ;
LIST Der/Pass = Der/PassL Der/PassS ; #!! * Der/PassL Der/PassS
LIST Der/NomAg = Der/NomAg ; #!! * Der/NomAg
LIST Actor = NomAg Der/NomAg ; #!! * NomAg
LIST Der/adda = Der/adda ; #!! * Der/adda
LIST Der/alla = Der/alla ; #!! * Der/alla
LIST Der/easti = Der/easti ; #!! * Der/easti
LIST Der/d = Der/d ; #!! * Der/d
LIST Der/eamoš = Der/eamoš ; #!! * Der/eamoš
LIST Der/amoš = Der/amoš ; #!! * Der/amoš
LIST Der/geahtes = Der/geahtes ; #!! * Der/geahtes
LIST Der/h = Der/h ; #!! * Der/h
LIST Der/Car = Der/Car ; #!! * Der/Car
LIST Der/Caus = Der/Caus ; #!! * Der/Car
LIST Der/huhtti = Der/huhtti ; #!! * Der/huhtti
LIST Der/huvva = Der/huvva ; #!! * Der/huvva
LIST Der/halla = Der/halla ; #!! * Der/halla
LIST Der/l = Der/l ; #!! * Der/l
LIST Der/lasj = Der/lasj ; #!! * Der/lasj
LIST Der/las = Der/las ; #!! * Der/las
LIST Der/meahttun = Der/meahttun ; #!! * Der/meahttun
LIST Der/muš = Der/muš ; #!! * Der/muš
LIST Der/NomAct = Der/NomAct ; #!! * Der/NomAct
LIST Der/sasj = Der/sasj ; #!! * Der/sasj
LIST Der/st = Der/st ; #!! * Der/st
LIST Der/stuvva = Der/stuvva ; #!! * Der/stuvva
LIST Der/upmi = Der/upmi ; #!! * Der/upmi
LIST Der/supmi = Der/supmi ; #!! * Der/supmi
LIST Der/vuota = Der/vuota ; #!! * Der/vuota
LIST Der/InchL = Der/InchL ; #!! * Der/InchL
LIST Der/laakan = Der/laakan ; #!! * Der/laakan
LIST Der/laagasj = Der/laagasj ; #!! * Der/laagasj
LIST Der/jagáš = Der/jagáš ; #!! * Der/jagáš
LIST Der/A = Der/A Der/A* ; #!! * Der/A Der/A* pga av bug i lookup2cg
LIST Der/Dimin = Der/Dimin ; #!! * Der/Dimin
LIST Der/viđá = Der/viđá ; #!! * Der/viđá
LIST Der/viđi = Der/viđi ; #!! * Der/viđi
LIST Der/veara = Der/veara ; #!! * Der/veara
LIST Der/AAdv = Der/AAdv ; #!! * Der/AAdv
LIST Der/Adv = Der/Adv ; #!! * Der/Adv
LIST Der/dáfot = Der/dáfot ; #!! * Der/dáfot
LIST Der/keahtta = Der/keahtta ; #!! * Der/keahtta
LIST Der/nuolus = Der/nuolus ; #!! * Der/nuolus
LIST Der/náittot = Der/náittot ; #!! * Der/náittot
LIST Der/seagat = Der/seagat ; #!! * Der/seagat
LIST Der/suttat = Der/suttat ; #!! * Der/suttat
LIST Der/ár = Der/ár ; #!! * Der/ár
LIST = ; #!! *
LIST Cmp/Hyph = Cmp/Hyph ; #!! * Cmp/Hyph
LIST = ;
LIST = ;
LIST = ;
LIST Err/Orth = Err/Orth Err/Lex Err/Orth-a-á Err/Orth-nom-gen Err/Orth-nom-acc Err/DerSub Err/CmpSub Err/UnspaceCmp Err/HyphSub Err/SpaceCmp Err/Spellrelax err_orth_mt ;
LIST Err/Orth-spes = Err/Orth-a-á Err/Orth-nom-gen Err/Orth-nom-acc Err/DerSub Err/CmpSub Err/UnspaceCmp Err/HyphSub Err/SpaceCmp Err/Spellrelax err_orth_a_á_mt err_orth_nom_acc_mt err_orth_nom_gen_mt ;
# secondary tags
# --------------
LIST <0> = <0> ;
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST = ; #CHECK
LIST