forked from GitHub/gf-core
Danish ordinals
This commit is contained in:
@@ -1,6 +1,22 @@
|
|||||||
--1 The category system
|
--1 The category system
|
||||||
|
|
||||||
|
-- The category system is central to the library in the sense
|
||||||
|
-- that the other modules ($Adjective$, $Adverb$, $Noun$, $Verb$ etc)
|
||||||
|
-- communicate through it. This means that a e.g. a function using
|
||||||
|
-- $NP$s in $Verb$ need not know how $NP$s are constructed in $Noun$:
|
||||||
|
-- it is enough that both $Verb$ and $Noun$ use the same type $NP$,
|
||||||
|
-- which is given here in $Cat$.
|
||||||
|
--
|
||||||
-- Some categories are inherited from [Common Common.html].
|
-- Some categories are inherited from [Common Common.html].
|
||||||
|
-- The reason they are defined there is that they have the same
|
||||||
|
-- implementation in all languages in the resource (typically,
|
||||||
|
-- just a string). These categories are
|
||||||
|
-- $AdA, AdN, AdV, Adv, Ant, CAdv, IAdv, PConj, Phr$,
|
||||||
|
-- $Pol, SC, Tense, Text, Utt, Voc$.
|
||||||
|
--
|
||||||
|
-- Moreover, the list categories $ListAdv, ListAP, ListNP, ListS$
|
||||||
|
-- are defined on $Conjunction$ and only used locally there.
|
||||||
|
|
||||||
|
|
||||||
abstract Cat = Common ** {
|
abstract Cat = Common ** {
|
||||||
|
|
||||||
@@ -84,7 +100,9 @@ abstract Cat = Common ** {
|
|||||||
|
|
||||||
--2 Words of open classes
|
--2 Words of open classes
|
||||||
|
|
||||||
-- These are constructed in [Lexicon Lexicon.html] and in additional lexicon modules.
|
-- These are constructed in [Lexicon Lexicon.html] and in
|
||||||
|
-- additional lexicon modules.
|
||||||
|
|
||||||
V ; -- one-place verb e.g. "sleep"
|
V ; -- one-place verb e.g. "sleep"
|
||||||
V2 ; -- two-place verb e.g. "love"
|
V2 ; -- two-place verb e.g. "love"
|
||||||
V3 ; -- three-place verb e.g. "show"
|
V3 ; -- three-place verb e.g. "show"
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
--1 Infrastructure with common implementations.
|
--1 Infrastructure with common implementations.
|
||||||
|
|
||||||
-- This module defines the categories that uniformly have the linearization
|
-- This module defines the categories that uniformly have the linearization
|
||||||
-- ${s : Str}$ in all languages. They are given lock fields that guarantee
|
-- ${s : Str}$ in all languages.
|
||||||
-- grammatical correctness via type checking.
|
|
||||||
|
|
||||||
-- Moreover, this module defines the abstract parameters of tense, polarity, and
|
-- Moreover, this module defines the abstract parameters of tense, polarity, and
|
||||||
-- anteriority, which are used in [Phrase Phrase.html] to generate different
|
-- anteriority, which are used in [Phrase Phrase.html] to generate different
|
||||||
|
|||||||
@@ -141,11 +141,11 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
mkTal : (x1,_,_,_,x5 : Str) -> LinDigit =
|
mkTal : (x1,_,_,_,x5 : Str) -> LinDigit =
|
||||||
\två, tolv, tjugo, andra, tolfte ->
|
\två, tolv, tjugo, andra, tyvende ->
|
||||||
{s = table {
|
{s = table {
|
||||||
ental => cardOrd två andra ;
|
ental => cardOrd två andra ;
|
||||||
ton => cardOrd tolv tolfte ;
|
ton => cardReg tolv ;
|
||||||
tiotal => cardReg tjugo
|
tiotal => cardOrd tjugo tyvende
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +1,55 @@
|
|||||||
concrete NumeralDan of Numeral = CatDan ** open ResScand, MorphoDan in {
|
concrete NumeralDan of Numeral = CatDan ** open ResScand, MorphoDan in {
|
||||||
|
|
||||||
|
|
||||||
|
-- AR 12/10/2002 following www.geocities.com/tsca.geo/dansk/dknummer.html
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Digit = {s : DForm => CardOrd => Str} ;
|
Digit = {s : DForm => CardOrd => Str} ;
|
||||||
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
||||||
Sub100, Sub1000, Sub1000000 =
|
Sub100, Sub1000, Sub1000000 =
|
||||||
{s : CardOrd => Str ; n : Number} ;
|
{s : CardOrd => Str ; n : Number} ;
|
||||||
|
|
||||||
lin
|
lin num x = x ;
|
||||||
num x = x ;
|
|
||||||
|
|
||||||
n2 = mkTal "to" "tolv" "tjue" "andre" "tolfte" ;
|
lin n2 = mkTal "to" "tolv" "tyve" "anden" "tyvende" ;
|
||||||
n3 = mkTal "tre" "tretten" "tretti" "tredje" "trettende" ;
|
lin n3 = mkTal "tre" "tretten" "tredive" "tredje" "tredivte" ;
|
||||||
n4 = mkTal "fire" "fjorten" "førti" "fjerde" "fjortende" ;
|
lin n4 = mkTal "fire" "fjorten" "fyrre" "fjerde" "fyrretyvende" ;
|
||||||
n5 = mkTal "fem" "femten" "femti" "femte" "femtende" ;
|
lin n5 = mkTal "fem" "femten" "halvtreds" "femte" "halvtredsindstyvende" ;
|
||||||
n6 = mkTal "seks" "seksten" "seksti" "sjette" "sextende" ;
|
lin n6 = mkTal "seks" "seksten" "tres" "sjette" "tredsindstyvende" ;
|
||||||
n7 = mkTal "sju" "sytten" "sytti" "syvende" "syttende" ;
|
lin n7 = mkTal "syv" "sytten" "halvfjerds" "syvende""halvfjerdsindstyvende" ;
|
||||||
n8 = mkTal "åtte" "atten" "åtti" "åttende" "attende" ;
|
lin n8 = mkTal "otte" "atten" "firs" "ottende""firsindstyvende" ;
|
||||||
n9 = mkTal "ni" "nitten" "nitti" "niende" "nittende" ;
|
lin n9 = mkTal "ni" "nitten" "halvfems" "niende" "halvfemsindstyvende" ;
|
||||||
|
|
||||||
pot01 = {
|
pot01 = {
|
||||||
s = \\f => table {
|
s = \\f => table {
|
||||||
NCard g => case g of {Neutr => "ett" ; _ => "en"} ;
|
NCard g => case g of {Neutr => "et" ; _ => "en"} ;
|
||||||
_ => "første"
|
_ => "første"
|
||||||
} ;
|
} ;
|
||||||
n = Sg
|
n = Sg
|
||||||
} ;
|
} ;
|
||||||
pot0 d = {s = \\f,g => d.s ! f ! g ; n = Pl} ;
|
pot0 d = {s = \\f,g => d.s ! f ! g ; n = Pl} ;
|
||||||
pot110 = numPl (cardReg "ti") ;
|
pot110 = numPl (cardReg "ti") ;
|
||||||
pot111 = numPl (cardOrd "elve" "elfte") ;
|
pot111 = numPl (cardOrd "elleve" "elvte") ;
|
||||||
pot1to19 d = numPl (d.s ! ton) ;
|
pot1to19 d = numPl (d.s ! ton) ;
|
||||||
pot0as1 n = {s = n.s ! ental ; n = n.n} ;
|
pot0as1 n = {s = n.s ! ental ; n = n.n} ;
|
||||||
pot1 d = numPl (d.s ! tiotal) ;
|
pot1 d = numPl (d.s ! tiotal) ;
|
||||||
pot1plus d e = {s = \\g => d.s ! tiotal ! invNum ++ e.s ! ental ! g ; n = Pl} ;
|
|
||||||
|
pot1plus d e = {
|
||||||
|
s = \\g => e.s ! ental ! invNum ++ "og" ++ d.s ! tiotal ! g ; n = Pl} ;
|
||||||
pot1as2 n = n ;
|
pot1as2 n = n ;
|
||||||
pot2 d =
|
pot2 d = numPl (\\_ => d.s ! ental ! invNum ++ "hundrede") ;
|
||||||
numPl (\\g => d.s ! ental ! invNum ++ cardOrd "hundre" "hundrede" ! g) ;
|
|
||||||
pot2plus d e =
|
pot2plus d e =
|
||||||
{s = \\g => d.s ! ental ! invNum ++ "hundre" ++ "og" ++ e.s ! g ; n = Pl} ;
|
{s = \\g => d.s ! ental ! invNum ++ "hundrede" ++ "og" ++ e.s ! g ; n = Pl} ;
|
||||||
pot2as3 n = n ;
|
pot2as3 n = n ;
|
||||||
pot3 n =
|
pot3 n = numPl (\\g => n.s ! invNum ++ cardOrd "tusind" "tusinde" ! g) ;
|
||||||
numPl (\\g => n.s ! invNum ++ cardOrd "tusen" "tusende" ! g) ;
|
pot3plus n m = {s = \\g => n.s ! invNum ++ "tusind" ++ "og" ++ m.s ! g ; n =Pl} ;
|
||||||
pot3plus n m =
|
|
||||||
{s = \\g => n.s ! invNum ++ "tusen" ++ "og" ++ m.s ! g ; n = Pl} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{-
|
||||||
|
lincat
|
||||||
|
Digit = {s : DForm => CardOrd => Str} ;
|
||||||
|
Sub10 = {s : DForm => CardOrd => Str ; n : Number} ;
|
||||||
|
Sub100, Sub1000, Sub1000000 =
|
||||||
|
{s : CardOrd => Str ; n : Number} ;
|
||||||
|
-}
|
||||||
|
|||||||
@@ -19,15 +19,16 @@ yet been "officially" released. The release will be made in combination
|
|||||||
with a new version of GF itself, since the grammars use new features
|
with a new version of GF itself, since the grammars use new features
|
||||||
not available in GF 2.4.
|
not available in GF 2.4.
|
||||||
|
|
||||||
V. 1.0 is not yet available for Russian and Danish: for them,
|
**New**. V. 1.0 is now (26 May) available Russian and Danish.
|
||||||
we refer to [v. 0.9 ../../resource/].
|
But the modules still need some testing, especially the Danish
|
||||||
|
lexicon (corrections welcome!).
|
||||||
|
|
||||||
|
|
||||||
==Authors==
|
==Authors==
|
||||||
|
|
||||||
Inger Andersson and Therese Soderberg (Spanish morphology),
|
Inger Andersson and Therese Soderberg (Spanish morphology),
|
||||||
Nicolas Barth and Sylvain Pogodalla (French verb list),
|
Nicolas Barth and Sylvain Pogodalla (French verb list),
|
||||||
Janna Khegai (Russian modules, forthcoming),
|
Janna Khegai (Russian modules),
|
||||||
Bjorn Bringert (many Swadesh lexica),
|
Bjorn Bringert (many Swadesh lexica),
|
||||||
Carlos Gonzalia (Spanish cardinals),
|
Carlos Gonzalia (Spanish cardinals),
|
||||||
Harald Hammarstrom (German morphology),
|
Harald Hammarstrom (German morphology),
|
||||||
@@ -45,11 +46,13 @@ Lauri Carlson,
|
|||||||
Gloria Casanellas,
|
Gloria Casanellas,
|
||||||
Karin Cavallin,
|
Karin Cavallin,
|
||||||
Robin Cooper,
|
Robin Cooper,
|
||||||
|
Ali El Dada,
|
||||||
Hans-Joachim Daniels,
|
Hans-Joachim Daniels,
|
||||||
Elisabet Engdahl,
|
Elisabet Engdahl,
|
||||||
Markus Forsberg,
|
Markus Forsberg,
|
||||||
Kristofer Johannisson,
|
Kristofer Johannisson,
|
||||||
Anni Laine,
|
Anni Laine,
|
||||||
|
Saara Myllyntausta,
|
||||||
Wanjiku Ng'ang'a,
|
Wanjiku Ng'ang'a,
|
||||||
Jordi Saludes.
|
Jordi Saludes.
|
||||||
|
|
||||||
@@ -141,21 +144,24 @@ The documentation of the individual modules:
|
|||||||
|
|
||||||
===The language-dependent APIs===
|
===The language-dependent APIs===
|
||||||
|
|
||||||
|
- [ParadigmsDan gfdoc/ParadigmsDan.html]: Danish lexical paradigms
|
||||||
- [ParadigmsEng gfdoc/ParadigmsEng.html]: English lexical paradigms
|
- [ParadigmsEng gfdoc/ParadigmsEng.html]: English lexical paradigms
|
||||||
- [ParadigmsFin gfdoc/ParadigmsFin.html]: Finnish lexical paradigms
|
- [ParadigmsFin gfdoc/ParadigmsFin.html]: Finnish lexical paradigms
|
||||||
- [ParadigmsFre gfdoc/ParadigmsFre.html]: French lexical paradigms
|
- [ParadigmsFre gfdoc/ParadigmsFre.html]: French lexical paradigms
|
||||||
- [ParadigmsIta gfdoc/ParadigmsIta.html]: Italian lexical paradigms
|
- [ParadigmsIta gfdoc/ParadigmsIta.html]: Italian lexical paradigms
|
||||||
- [ParadigmsGer gfdoc/ParadigmsGer.html]: German lexical paradigms
|
- [ParadigmsGer gfdoc/ParadigmsGer.html]: German lexical paradigms
|
||||||
- [ParadigmsNor gfdoc/ParadigmsNor.html]: Norwegian lexical paradigms
|
- [ParadigmsNor gfdoc/ParadigmsNor.html]: Norwegian lexical paradigms
|
||||||
|
- [ParadigmsRus gfdoc/ParadigmsRus.html]: Russian lexical paradigms
|
||||||
- [ParadigmsSpa gfdoc/ParadigmsSpa.html]: Spanish lexical paradigms
|
- [ParadigmsSpa gfdoc/ParadigmsSpa.html]: Spanish lexical paradigms
|
||||||
- [ParadigmsSwe gfdoc/ParadigmsSwe.html]: Swedish lexical paradigms
|
- [ParadigmsSwe gfdoc/ParadigmsSwe.html]: Swedish lexical paradigms
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- [IrregDan gfdoc/IrregDan.gf]: Danish irregular verbs (very incomplete)
|
||||||
- [IrregEng gfdoc/IrregEng.gf]: English irregular verbs
|
- [IrregEng gfdoc/IrregEng.gf]: English irregular verbs
|
||||||
- [IrregFre gfdoc/IrregFre.gf]: French irregular verbs
|
- [IrregFre gfdoc/IrregFre.gf]: French irregular verbs
|
||||||
% - [IrregGer gfdoc/IrregGer.gf]: German irregular verbs
|
% - [IrregGer gfdoc/IrregGer.gf]: German irregular verbs
|
||||||
- [IrregNor gfdoc/IrregNor.gf]: Norwegian irregular verbs
|
- [IrregNor gfdoc/IrregNor.gf]: Norwegian irregular verbs (very incomplete)
|
||||||
- [IrregSwe gfdoc/IrregSwe.gf]: Swedish irregular verbs
|
- [IrregSwe gfdoc/IrregSwe.gf]: Swedish irregular verbs
|
||||||
|
|
||||||
|
|
||||||
@@ -199,7 +205,8 @@ library. Use one (or several) of the following packages instead:
|
|||||||
- ``lib/alltenses`` the complete ground-API library with all forms
|
- ``lib/alltenses`` the complete ground-API library with all forms
|
||||||
- ``lib/present`` a pruned ground-API library with present tense only
|
- ``lib/present`` a pruned ground-API library with present tense only
|
||||||
- ``lib/mathematical`` special-purpose API for mathematical applications
|
- ``lib/mathematical`` special-purpose API for mathematical applications
|
||||||
- ``lib/multimodal`` special-purpose API for multimodal dialogue applications
|
- ``lib/multimodal`` the complete ground-API with demonstratives for
|
||||||
|
multimodal dialogue applications
|
||||||
|
|
||||||
|
|
||||||
===Linking applications to libraries===
|
===Linking applications to libraries===
|
||||||
@@ -210,9 +217,9 @@ Notice, however, that both special-purpose APIs share modules with
|
|||||||
|
|
||||||
|
|
||||||
It is advisable to use the bare package names in paths pointing to the
|
It is advisable to use the bare package names in paths pointing to the
|
||||||
libraries. Here is an example, from ``examples/tram``:
|
libraries. Here is an example, from ``examples/dialogue/LightsEng.gf``:
|
||||||
```
|
```
|
||||||
--# -path=.:present:multimodal:mathematical:prelude
|
--# -path=.:alltenses:multimodal:prelude
|
||||||
```
|
```
|
||||||
To reach these directories from anywhere, set the environment variable
|
To reach these directories from anywhere, set the environment variable
|
||||||
``GF_LIB_PATH`` to point to the directory ``GF/lib/``. For instance,
|
``GF_LIB_PATH`` to point to the directory ``GF/lib/``. For instance,
|
||||||
@@ -244,7 +251,7 @@ both ``alltenses/LangEng`` and ``present/LangEng`` - the latter being
|
|||||||
much faster than the former. The ``-mcfg`` flag (multiple context-free grammar)
|
much faster than the former. The ``-mcfg`` flag (multiple context-free grammar)
|
||||||
must be used:
|
must be used:
|
||||||
```
|
```
|
||||||
p -lang=LangEng -mcfg "this man is old"
|
p -lang=LangEng -mcfg -parser=topdown "this man is old"
|
||||||
```
|
```
|
||||||
Parsing with the ``-mcfg`` flag takes a few extra seconds the first time during
|
Parsing with the ``-mcfg`` flag takes a few extra seconds the first time during
|
||||||
each session, but gets faster at later runs.
|
each session, but gets faster at later runs.
|
||||||
@@ -264,11 +271,11 @@ based on the Swadesh list of 200 words. It is useful for
|
|||||||
things like language training.
|
things like language training.
|
||||||
|
|
||||||
|
|
||||||
===Tram===
|
===Dialogue===
|
||||||
|
|
||||||
The [examples/tram ../../../examples/tram]
|
The [examples/dialogue ../../../examples/dialogue]
|
||||||
grammar set implements the user grammar of a
|
grammar set implements the user grammars of some
|
||||||
multimodal dialogue system concerning public transport.
|
multimodal dialogue system.
|
||||||
Its purpose is to serve as a prototype for applications in the
|
Its purpose is to serve as a prototype for applications in the
|
||||||
TALK project.
|
TALK project.
|
||||||
|
|
||||||
@@ -286,7 +293,7 @@ grammar writing.
|
|||||||
This bugs should be fixed before the final release of v. 1.0.
|
This bugs should be fixed before the final release of v. 1.0.
|
||||||
|
|
||||||
Danish
|
Danish
|
||||||
- API 1.0 not implemented
|
- the lexicon and chosen inflections are only partially verified
|
||||||
|
|
||||||
|
|
||||||
English
|
English
|
||||||
@@ -294,8 +301,7 @@ English
|
|||||||
|
|
||||||
|
|
||||||
Finnish
|
Finnish
|
||||||
- no possessive suffixes
|
- wrong cases in some passive constructions
|
||||||
- wrong cases in passive constructions
|
|
||||||
|
|
||||||
|
|
||||||
French
|
French
|
||||||
@@ -312,11 +318,12 @@ Italian
|
|||||||
|
|
||||||
|
|
||||||
Norwegian
|
Norwegian
|
||||||
- word order in compound verbs sometimes wrong
|
- the lexicon and chosen inflections are only partially verified
|
||||||
|
|
||||||
|
|
||||||
Russian
|
Russian
|
||||||
- API 1.0 not implemented
|
- some functions missing
|
||||||
|
- regular paradigms are missing
|
||||||
|
|
||||||
|
|
||||||
Spanish
|
Spanish
|
||||||
@@ -324,7 +331,7 @@ Spanish
|
|||||||
|
|
||||||
|
|
||||||
Swedish
|
Swedish
|
||||||
- word order in compound verbs sometimes wrong
|
-
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -348,5 +355,6 @@ French, Italian, and Spanish.
|
|||||||
Slides showing how the method is used.
|
Slides showing how the method is used.
|
||||||
|
|
||||||
[Multimodal Resource Grammars http://www.cs.chalmers.se/~aarne/slides/talk-edin2005.pdf].
|
[Multimodal Resource Grammars http://www.cs.chalmers.se/~aarne/slides/talk-edin2005.pdf].
|
||||||
Slides showing how to use the multimodal resource library.
|
Slides showing how to use the multimodal resource library. N.B. the library
|
||||||
|
examples are from ``multimodal/old``, which is a reduced-size API.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user