Finite state and Constraint Grammar based analysers, proofing tools and other resources
View the project on GitHub giellalt/lang-cor
All doc-comment documentation in one large file.
Sets for POS sub-categories
Sets for Semantic tags
Sets for Morphosyntactic properties
Sets for verbs
V is all readings with a V tag in them, REAL-V should
be the ones without an N tag following the V.
The REAL-V set thus awaits a fix to the preprocess V … N bug.
The set COPULAS is for predicative constructions
NP sets defined according to their morphosyntactic features
The PRE-NP-HEAD family of sets
These sets model noun phrases (NPs). The idea is to first define whatever can occur in front of the head of the NP, and thereafter negate that with the expression WORD - premodifiers.
The set NOT-NPMOD is used to find barriers between NPs. Typical usage: … (*1 N BARRIER NPT-NPMOD) … meaning: Scan to the first noun, ignoring anything that can be part of the noun phrase of that noun (i.e., “scan to the next NP head”)
Miscellaneous sets
Border sets and their complements
Syntactic sets
These were the set types.
hab1
hab2
hab3 (
habNomLeft
hab4
hab6
hab7
hab5 This is not HAB
habDain (
habGen (
spred<obj (@SPRED<OBJ) for Acc; the object of an SPRPED. Not to be mistaken with OPRED. If SPRED is to the left, and copulas is to the left of it. Nom or Hab are found sentence initially.
Hab<spred (@<SPRED) for Nom; if copulas, goallut or jápmit is FMAINV and habitive or human Loc is found to the left. OR: if Ill or @Pron< followed by HAB are found to the left.
Hab>Advlcase<spred (
Nom>Advlcase<spred (
<spred (
<spred (
<spredQst1 (
<spredQst2 (@<SPRED) for Nom; in a typically question sentence; differs from <spredQst1 by not beeing as restricted to the right. Though you are not allowed to be Pers or human.
Nom<spredQst (@<SPRED) for Nom; in a typically question sentence. Differs from <spredQst2 by letting Nom be found between SPRED and copulas
<spred (@<SPRED) for A Nom or N Nom if; the subject Nom is on the same side of copulas as you: on the right side of copulas
<spredVeara (@<SPRED) for veara + Nom; if genitive immediately to the right, and intransitive mainverb to the right of genitive
leftCop<spred (@<SPRED) for Nom; if copulas is the main verb to the left, and there is no Ess found to the left of cop (note that Loc is allowed between target and cop). OR: if you are Coll or Sem/Group with copulas to your left.
<spredLocEXPERIMENT (@<SPRED) for material Loc; if you are to the right of copulas, and the Nom to the left of copulas is not a hab-actor
NumTime (@<SPRED) for A Nom
<spredSg (@<SPRED) for Sg Nom
<spredPg (@<SPRED) for Pl Nom
<spred (@<SPRED) for Nom; if copulas to the left, and Nom or sentence boundary to the left of copulas. First one to the right is EOS.
<spred (@<SPRED) for N Ess
spredEss> (@SPRED>) for N Ess; if copulas to the right of you, and if an NP with nom-case first one to your left.
HABSpredSg> (@SPRED>) for Nom; if habitive first one to the left, followed by copulas.
GalleSpred> (@SPRED>) for Num Nom; if sentence initial
spredSgMII> (@SPRED>)
r492> (@SPRED>) for Interr Gen; consisting only of negations. You are not allowed to be MII. You are not allowed to have an adjective or noun to yor right. You are not allowed to have a verb to your right; the exception beeing an aux.
AdjSpredSg> (@SPRED>) for A Sg Nom; if copulas to the right, but not if A or @<SPRED are found to the right of copulas
SpredSg>Hab (@SPRED>) for Nom; if you are sentence initial, copulas is located to the right, and there is a habitive to the right of copulas
Spred>SubjInf (@SPRED>) for Nom; if copulas to the right, and the subject of copulas is an Inf to the right
spredCoord (@<SPRED) coordination for Nom; only if there already is a SPRED to the left of CNP. Not if there is some kind of comparison involved.
subj>Sgnr1 (@SUBJ>) for Nom Sg, including Indef Nom if; VFIN + Sg3 or Pl3 to the right (VFIN not allowed to the left)
subj>Pl (@SUBJ>) for plural nominatives, including Coll and Sem/Group. VFIN + Pl3 to the right.
subj>Pl (@SUBJ>) for plural nominatives
subj>Sgnr2 (@SUBJ>) for Nom Sg; if VFIN + Sg3 to the right.
<subjSg (@<SUBJ) for Nom Sg; if VFIN Sg3 or Du2 to the left (no HAB allowed to the left).
f<advl (@-F<ADVL) for infinite adverbials
f<advl (@-F<ADVL) for infinite adverbials
s-boundary=advl> (@ADVL>) for ADVL that resemble s-booundaries. Mainverb to the right.
-fobj> (@-FOBJ>) for Acc
-fobj> (@-FOBJ>) for Acc
advl>mainV (@ADVL>) if; finite mainverb not found to the left, but the finite mainverb is found to the right.
<advl (@<ADVL) if; finite mainverb found to the left. Not if a comma is found immediately to the left and a finite mainverb is located somewhere to the right of this comma.
advlPoPr> (@<ADVL) if mainverb to the right.
advlEss> (@<ADVL) for weather and time Ess, if FMAINV to the left.
advl>inbetween (@ADVL>) for Adv; if inbetween two sentenceboundaries where no mainverb is present.
comma<advlEOS (@<ADVL) if; comma found to the left and the finite mainverb to the left of comma. To the right is the end of the sentence.
advlBOS> (@ADVL>) if; you are N Ill and found sentnece initially. First one to your right is a clause.
<advlPoEOS (@<ADVL) for Po; if you are found at the very end of a sentence. A mainverb is needed to the right though.
cleanupILL<advl (@<ADVL) for N Ill if; there are no boundarysymbols to your left, if you arent already @N< OR @APP-N<, and no mainverb is to yor left.
This (part of) documentation was generated from src/cg3/functions.cg3
Only add tag so far.
This (part of) documentation was generated from src/fst/morphology/affixes/adjectives.lexc
The nouns get tags (to the left of :, i.e. in the upper representation and the suffixes are found to the left of the colon
LEXICON m
LEXICON m-yow
LEXICON m-ow
LEXICON m-ys
LEXICON m-es
LEXICON m-s
LEXICON m-yon
LEXICON m-aff-i
LEXICON m-ag
LEXICON m-sgtantum
LEXICON m-pltantum
LEXICON f
LEXICON f-yow
LEXICON f-edh
Nest step:
Here we add suffixes. These may be common to several stem classes and are therefore pointed to in a different layer (this one)
LEXICON sg
LEXICON yonpl
LEXICON owpl
LEXICON yowpl
LEXICON ipl
LEXICON yspl
LEXICON espl
LEXICON edhpl
LEXICON spl
LEXICON adjd
LEXICON KI
LEXICON DEN
LEXICON OJYON
LEXICON GARLONT
This (part of) documentation was generated from src/fst/morphology/affixes/nouns.lexc
Numeral inflection is like nominal, except that numerals compound in all forms which requires great amount of care in the inflection patterns.
LEXICON ARABICCASES adds +Arab
LEXICON ARABICCASE adds +Arab
LEXICON ARABICCASE0 adds +Arab
This (part of) documentation was generated from src/fst/morphology/affixes/numerals.lexc
This (part of) documentation was generated from src/fst/morphology/affixes/propernouns.lexc
This (part of) documentation was generated from src/fst/morphology/affixes/symbols.lexc
This (part of) documentation was generated from src/fst/morphology/affixes/verbs.lexc
Cornish morph-phon grammar file
This is the file for the morphophonological rules.
We keep a verbose style, at each point we tell what we will do. That is the echo commands.
Here, we have left some documentation for curious readers:
These triggers are given a name, so that we can delete them when they have done their job.
DummySymbols
Boundary
Dummy
Cns
Yy
Symbols
Here the action begins.
!identity
gsoft: If we encounter a final %^S symbol, we delete an initial g
Etc for changing g to h in front of %^M, etc.
Then we generalise: softmut p -> b etc. in front of %^S
Change gw to g with gwsimplification
Aspirant mutation p > f etc. in front of %^A
k to h in front of %^A with kaspmut
!The other consonant rules
Devoicing b -> p etc. in front of %^P
Voiced plosive to fric with mixed in front of %^M
Nonmutation as identity when we do not have triggers. Hmm, why is this needed?
ConsonantDoublingI bdg in front of %^CD
ConsonantDoublingII t in front of %^CD
ConsonantDoublingIII various cns in front of %^CD
Devoicing b -> p
Deleting light stem vowel with LightStemVow
AuslautHerdung
Umlaut of e3, a4, … in %^UML contexts Always Uml if affix. Then Uml if no affix, but when %^UML mark
The triggers have done their work The order of rules here is not crucial, crucial is the order below: But it is a good idea to have the same rule here as well. Dummydeletion comes last:
ArchiPhonemes should not be on the surface
Then we compile, one rule after another.
This (part of) documentation was generated from src/fst/morphology/phonology.xfscript
First, we declare multicharacter symbols
+Prs +Fut +Prt +Prf +Ipf +Plf
+Ind +Imp +Sbj
+Inf +Sit ! what is +Sit?
+Pos +Neg +ConNeg
+1Sg +2Sg +3Sg +1Pl +2Pl +3Pl
+Impers
+Ptc
+VN
+Sg +Pl +P
+Nom +Acc +Gen
+Ord
+Suff +Emph +Indef
+Msc +Fem
Diacritical marks, to trigger morphophonological rules. The “%” symbol literalises the next symbol
%^S %^A %^P %^M %^V %^E
%> %^D
%^UML %^CD %^TRUNC %^STDEL
e3 e to o in plural a4 o4 Umlaut phonemes, changing to e
%[%>%] - Literal >
%[%<%] - Literal <
We have manually optimised the structure of our lexicon using following flag diacritics to restrict morhpological combinatorics - only allow compounds with verbs if the verb is further derived into a noun again:
Flag | Explanation |
---|---|
@P.NeedNoun.ON@ | (Dis)allow compounds with verbs unless nominalised |
@D.NeedNoun.ON@ | (Dis)allow compounds with verbs unless nominalised |
@C.NeedNoun@ | (Dis)allow compounds with verbs unless nominalised |
For languages that allow compounding, the following flag diacritics are needed to control position-based compounding restrictions for nominals. Their use is handled automatically if combined with +CmpN/xxx tags. If not used, they will do no harm.
Flag | Explanation |
---|---|
@P.CmpFrst.FALSE@ | Require that words tagged as such only appear first |
@D.CmpPref.TRUE@ | Block such words from entering ENDLEX |
@P.CmpPref.FALSE@ | Block these words from making further compounds |
@D.CmpLast.TRUE@ | Block such words from entering R |
@D.CmpNone.TRUE@ | Combines with the next tag to prohibit compounding |
@U.CmpNone.FALSE@ | Combines with the prev tag to prohibit compounding |
@P.CmpOnly.TRUE@ | Sets a flag to indicate that the word has passed R |
@D.CmpOnly.FALSE@ | Disallow words coming directly from root. |
Use the following flag diacritics to control downcasing of derived proper nouns (e.g. Finnish Pariisi -> pariisilainen). See e.g. North Sámi for how to use these flags. There exists a ready-made regex that will do the actual down-casing given the proper use of these flags.
Flag | Explanation |
---|---|
@U.Cap.Obl@ | Allowing downcasing of derived names: deatnulasj. |
@U.Cap.Opt@ | Allowing downcasing of derived names: deatnulasj. |
@P.Pmatch.Backtrack@ | For preprocessing |
@R.ErrOrth.ON@ | resetting ErrOrth flag |
@C.ErrOrth@ | clearing ErrOrth Flag. |
Flag diacritic | Explanation |
---|---|
@U.number.one@ | Flag used to give arabic numerals in smj different cases ; |
@U.number.two@ | Flag used to give arabic numerals in smj different cases ; |
@U.number.three@ | Flag used to give arabic numerals in smj different cases ; |
@U.number.four@ | Flag used to give arabic numerals in smj different cases ; |
@U.number.five@ | Flag used to give arabic numerals in smj different cases ; |
@U.number.six@ | Flag used to give arabic numerals in smj different cases ; |
@U.number.seven@ | Flag used to give arabic numerals in smj different cases ; |
@U.number.eight@ | Flag used to give arabic numerals in smj different cases ; |
@U.number.nine@ | Flag used to give arabic numerals in smj different cases ; |
@U.number.zero@ | Flag used to give arabic numerals in smj different cases ; |
Adhoc lexica, to be fixed
This (part of) documentation was generated from src/fst/morphology/root.lexc
Some 1300 adjectives, only one continuation lexicon. (adj).
LEXICON Adjective Albanek adj “Scottish. Scots” ; Almaynek adj “German” ; a-berthek adj “intrinsic” ; a-dhevis adj “exact” ; ardhek adj “lofty” ; arhansek adj “financial” ; arnowydh adj “modern” ; …
This (part of) documentation was generated from src/fst/morphology/stems/adjectives.lexc
Documenting stems/adverbs.lexc
Adding the tag +Adv
LEXICON adv adds the tag +Adv +Adv: # ;
The adverbs
LEXICON Adverb lists the adverbs a-bell adv “afar. “ ; a-bervedh adv “inside, indoors, aboard.” ; a-ble adv “whence, from what place. “ ; dhi adv “thither, to that place.” ; hedhyw adv “today.” ; hevlyna adv “this year.” ; isos adv “downward, below.” ; jammes adv “never.” ;
Then comes the list with adverbs from the 2020 dictionary
This (part of) documentation was generated from src/fst/morphology/stems/adverbs.lexc
This documents the file stems/conjunctions.lexc
. Note that based on the English
translations it seems there are some subjunctions here, and it also seems the Cornish
version of and is missing. Have a look at the original file!
LEXICON CC adds tag +CC
LEXICON Conjunction lists 30 or so conjunctions mes CC “but” ; hag CC “and (before vowels)” ; ha CC “and (before consonants)” ; po CC “or” ; bo CC “or” ; py CC “or” ; rag CC “for” ;
2020 dictionary CC entries not known to fst
This (part of) documentation was generated from src/fst/morphology/stems/conjunctions.lexc
LEXICON aj adds tag
LEXICON Interjection lists the interjections
Words from 2020 dictionary
This (part of) documentation was generated from src/fst/morphology/stems/interjections.lexc
Masculines
Feminines
ki, den, ojyon, …
lemmaform:stem continuationlexicon “facultative translation” ; without the colon, lemmaform and stem are identical. The morphology is then handeled in noun-kor-morph.txt
Here the noun types begin:
All -(y)ans nouns are here even though the dictionary lists no plurals for them (Brown, p. 30)
yow plural
ys plural
yon plural
-(y)er agent nouns
-es plural
-s plural
balek-wörter
Duals
Root vowel change
yon plural
i plural
Singularia tantum
Pluralia tantum
m-ow
m-yow
m-ys
Masculine nouns from 2020 dictionary. TODO: Check for inflection class
Feminine nouns from 2020 dictionary. TODO: Check for inflection class
This (part of) documentation was generated from src/fst/morphology/stems/nouns.lexc
LEXICON Numeral
onen card-yow “one” ;
This (part of) documentation was generated from src/fst/morphology/stems/numerals.lexc
Four classes:
LEXICON pp tag only
LEXICON pp-prono tag and person forms, -o-
LEXICON pp-proni tag and person -i-
LEXICON pp-a tag and person form -a-
LEXICON Preposition the list (some 20-30)
This (part of) documentation was generated from src/fst/morphology/stems/prepositions.lexc
This file lists pronouns fullforms.
LEXICON Pronoun
LEXICON Personal
LEXICON Suffixed
LEXICON Demonstrative
LEXICON Determinative
LEXICON Possessive
LEXICON Indefinite
This (part of) documentation was generated from src/fst/morphology/stems/pronouns.lexc
This file lists cornish proper nouns. They are directed to the same continuation lexicon.
This (part of) documentation was generated from src/fst/morphology/stems/propernouns.lexc
This file lists the subjunctions and assign them the +CS tag.
LEXICON CS Adds tag +CS
LEXICON Subjunction contains the 20 or so subjunctions ages CS “than” ; awos CS “because, though, for the sake of, in spite of” ; drefenn CS “because, on account of” ; erna CS “till, until” ; …
This (part of) documentation was generated from src/fst/morphology/stems/subjunctions.lexc
This shows two version of the analysis, one from 2009 (for reference) and one from 2020 (the current one).
vb1-vb5 are declension classes.
vb5) -el/-i -C[l | n | m](r)-Verben |
2020 verbs were added as follows: verbs with -ya, -i, -he infinitive to vbya, vbi, vbye verbs in -a other than -ya to vb1 all other verbs to vb TODO: Go through the new verbs (at the end of this file)
Todo:
It is fortunately easier than that:
LEXICON Verb lists all the verbs
AUX ; = this one entry points to the AUX lexicon in the affixes catalogue
Verbs from the 2020 dictionary
This (part of) documentation was generated from src/fst/morphology/stems/verbs.lexc
retroflex plosive, voiceless t ʈ 0288, 648 (
= ASCII 096)
retroflex plosive, voiced d ɖ 0256, 598
labiodental nasal F ɱ 0271, 625
retroflex nasal n
ɳ 0273, 627
palatal nasal J ɲ 0272, 626
velar nasal N ŋ 014B, 331
uvular nasal N\ ɴ 0274, 628
bilabial trill B\ ʙ 0299, 665
uvular trill R\ ʀ 0280, 640
alveolar tap 4 ɾ 027E, 638
retroflex flap r ɽ 027D, 637
bilabial fricative, voiceless p\ ɸ 0278, 632
bilabial fricative, voiced B β 03B2, 946
dental fricative, voiceless T θ 03B8, 952
dental fricative, voiced D ð 00F0, 240
postalveolar fricative, voiceless S ʃ 0283, 643
postalveolar fricative, voiced Z ʒ 0292, 658
retroflex fricative, voiceless s
ʂ 0282, 642
retroflex fricative, voiced z` ʐ 0290, 656
palatal fricative, voiceless C ç 00E7, 231
palatal fricative, voiced j\ ʝ 029D, 669
velar fricative, voiced G ɣ 0263, 611
uvular fricative, voiceless X χ 03C7, 967
uvular fricative, voiced R ʁ 0281, 641
pharyngeal fricative, voiceless X\ ħ 0127, 295
pharyngeal fricative, voiced ?\ ʕ 0295, 661
glottal fricative, voiced h\ ɦ 0266, 614
alveolar lateral fricative, vl. K alveolar lateral fricative, vd. K\
labiodental approximant P (or v) alveolar approximant r\ retroflex approximant r` velar approximant M\
retroflex lateral approximant l`
palatal lateral approximant L
velar lateral approximant L
Clicks
bilabial O\ (O = capital letter)
dental |
(post)alveolar !\
palatoalveolar =\
alveolar lateral ||
Ejectives, implosives
ejective > e.g. ejective p p> implosive < e.g. implosive b b< Vowels
close back unrounded M close central unrounded 1 close central rounded } lax i I lax y Y lax u U
close-mid front rounded 2 close-mid central unrounded @\ close-mid central rounded 8 close-mid back unrounded 7
schwa ə @
open-mid front unrounded E open-mid front rounded 9 open-mid central unrounded 3 open-mid central rounded 3\ open-mid back unrounded V open-mid back rounded O
ash (ae digraph) { open schwa (turned a) 6
open front rounded & open back unrounded A open back rounded Q Other symbols
voiceless labial-velar fricative W voiced labial-palatal approx. H voiceless epiglottal fricative H\ voiced epiglottal fricative <\ epiglottal plosive >\
alveolo-palatal fricative, vl. s\ alveolo-palatal fricative, voiced z\ alveolar lateral flap l\ simultaneous S and x x\ tie bar _ Suprasegmentals
primary stress “
secondary stress %
long :
half-long :\
extra-short _X
linking mark -
Tones and word accents
level extra high _T level high _H level mid _M level low _L level extra low _B downstep ! upstep ^ (caret, circumflex)
contour, rising contour, falling _F contour, high rising _H_T contour, low rising _B_L
contour, rising-falling _R_F
(NB Instead of being written as diacritics with _, all prosodic
marks can alternatively be placed in a separate tier, set off
by < >, as recommended for the next two symbols.)
global rise
voiceless 0 (0 = figure), e.g. n_0 voiced _v aspirated _h more rounded _O (O = letter) less rounded _c advanced _+ retracted _- centralized _” syllabic = (or _=) e.g. n= (or n=) non-syllabic _^ rhoticity `
breathy voiced _t creaky voiced _k linguolabial _N labialized _w palatalized ‘ (or _j) e.g. t’ (or t_j) velarized _G pharyngealized _?\
dental d apical _a laminal _m nasalized ~ (or _~) e.g. A~ (or A~) nasal release _n lateral release _l no audible release _}
velarized or pharyngealized _e velarized l, alternatively 5 raised _r lowered _o advanced tongue root _A retracted tongue root _q
This (part of) documentation was generated from src/fst/phonetics/txt2ipa.xfscript
We describe here how abbreviations are in Cornish are read out, e.g. for text-to-speech systems.
For example:
This (part of) documentation was generated from src/fst/transcriptions/transcriptor-abbrevs2text.lexc
% komma% :, Root ; % tjuohkkis% :%. Root ; % kolon% :%: Root ; % sárggis% :%- Root ; % násti% :%* Root ;
This (part of) documentation was generated from src/fst/transcriptions/transcriptor-numbers-digit2text.lexc
[ L A N G U A G E ] G R A M M A R C H E C K E R
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.
BOS EOS
N A Adv V Pron CS CC CC-CS Po Pr Pcle Num Interj ABBR ACR CLB LEFT RIGHT WEB PPUNCT PUNCT
COMMA ¶
Pers Dem Interr Indef Recipr Refl Rel Coll NomAg Prop Allegro Arab Romertall
Nom Acc Gen Ill Loc Com Ess Ess Sg Du Pl Cmp/SplitR Cmp/SgNom Cmp/SgGen Cmp/SgGen PxSg1 PxSg2 PxSg3 PxDu1 PxDu2 PxDu3 PxPl1 PxPl2 PxPl3 Px
Comp Superl Attr Ord Qst IV TV Prt Prs Ind Pot Cond Imprt ImprtII Sg1 Sg2 Sg3 Du1 Du2 Du3 Pl1 Pl2 Pl3 Inf ConNeg Neg PrfPrc VGen PrsPrc Ger Sup Actio VAbess
Err/Orth
Sem/Act Sem/Ani Sem/Atr Sem/Body Sem/Clth Sem/Domain Sem/Feat-phys Sem/Fem Sem/Group Sem/Lang Sem/Mal Sem/Measr Sem/Money Sem/Obj Sem/Obj-el Sem/Org Sem/Perc-emo Sem/Plc Sem/Sign Sem/State-sick Sem/Sur Sem/Time Sem/Txt
HUMAN
PROP-ATTR PROP-SUR
TIME-N-SET
@+FAUXV @+FMAINV @-FAUXV @-FMAINV @-FSUBJ> @-F<OBJ @-FOBJ> @-FSPRED<OBJ @-F<ADVL @-FADVL> @-F<SPRED @-F<OPRED @-FSPRED> @-FOPRED> @>ADVL @ADVL< @<ADVL @ADVL> @ADVL @HAB> @<HAB @>N @Interj @N< @>A @P< @>P @HNOUN @INTERJ @>Num @Pron< @>Pron @Num< @OBJ @<OBJ @OBJ> @OPRED @<OPRED @OPRED> @PCLE @COMP-CS< @SPRED @<SPRED @SPRED> @SUBJ @<SUBJ @SUBJ> SUBJ SPRED OPRED @PPRED @APP @APP-N< @APP-Pron< @APP>Pron @APP-Num< @APP-ADVL< @VOC @CVP @CNP OBJ