mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-30 10:28:53 -06:00
Add Translate grammar for Eus (lot of functions still commented out) and Dictionary, converted by Francis Tyers from Apertium resources
This commit is contained in:
9623
src/translator/DictionaryEus.gf
Normal file
9623
src/translator/DictionaryEus.gf
Normal file
File diff suppressed because it is too large
Load Diff
58
src/translator/ExtensionsEus.gf
Normal file
58
src/translator/ExtensionsEus.gf
Normal file
@@ -0,0 +1,58 @@
|
||||
--# -path=.:../abstract:../basque
|
||||
|
||||
concrete ExtensionsEus of Extensions =
|
||||
CatEus ** open ResEus, ParamEus, ParadigmsEus, ExtraEus, SentenceEus, Prelude in {
|
||||
|
||||
lincat
|
||||
VPI,VPS = SS ;
|
||||
|
||||
lin
|
||||
|
||||
-- : Temp -> Pol -> VP -> VPS ; -- had walked
|
||||
MkVPS t p vp =
|
||||
let emptyCl = clFromVP empty_NP vp ;
|
||||
emptyS = UseCl t p emptyCl ;
|
||||
in { s = linS emptyS.s } ;
|
||||
|
||||
-- : NP -> VPS -> S ; -- I had walked and drank beer
|
||||
PredVPS np vps = lin S {
|
||||
s = { beforeAux = np.s ! Erg ++ vps.s ;
|
||||
aux = { indep, stem = [] } ;
|
||||
afterAux = [] } } ; -- TODO: make VPS actually not lose all this info >__>
|
||||
|
||||
|
||||
UttAdV adv = adv ;
|
||||
|
||||
|
||||
--GerundCN : VP -> CN ; -- publishing of the document (can get a determiner)
|
||||
--GerundNP : VP -> NP ; -- publishing the document (by nature definite)
|
||||
--GerundAdv : VP -> Adv ; -- publishing the document (prepositionless adverb)
|
||||
|
||||
--ByVP : VP -> Adv ; -- by publishing the document
|
||||
-- asko ibiltzeaz
|
||||
|
||||
-- WithoutVP : VP -> Adv ; -- without publishing the document
|
||||
-- Artzain zaharra atera zen mendirantz inori ezer esan gabe.
|
||||
-- shepherd old went mountain.toward to.nobody nothing said without
|
||||
WithoutVP vp = { s = complOrder vp Neg
|
||||
++ vp.prc ! Past -- eman
|
||||
++ "gabe" } ; -- gabe
|
||||
|
||||
-- : VP -> Adv ; -- (in order) to publish the document
|
||||
-- hemen ibiltzeko ‘in order to walk here’,
|
||||
-- ongi hiltzeko ‘in order to die well’, ona izateko ‘in order to be good’.
|
||||
-- haurra noratzen zuten ikusteko ‘in order to see where they took the child’.]
|
||||
-- corresponding interrogative is zertarako ‘what for’
|
||||
InOrderToVP vp = { s = complOrder vp Pos
|
||||
++ glue vp.nstem "ko" } ; --emateko
|
||||
|
||||
|
||||
oper
|
||||
|
||||
complOrder : VP -> Polarity -> Str = \vp,pol ->
|
||||
vp.adv ++ -- gaur
|
||||
vp.iobj.s ++ -- mutilari
|
||||
vp.dobj.s ! pol ++ -- garagardoa
|
||||
vp.comp ! Hau ;
|
||||
|
||||
}
|
||||
35
src/translator/TranslateEus.gf
Normal file
35
src/translator/TranslateEus.gf
Normal file
@@ -0,0 +1,35 @@
|
||||
--# -path=.:../chunk:alltenses:../basque
|
||||
|
||||
concrete TranslateEus of Translate =
|
||||
TenseX,
|
||||
CatEus,
|
||||
NounEus - [PPartNP],
|
||||
AdjectiveEus,
|
||||
NumeralEus,
|
||||
VerbEus - [PassV2,UseCopula],
|
||||
SentenceEus,
|
||||
ConjunctionEus,
|
||||
AdverbEus,
|
||||
PhraseEus,
|
||||
QuestionEus,
|
||||
RelativeEus,
|
||||
IdiomEus,
|
||||
SymbolEus [PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP], ---- why only these?
|
||||
ConstructionEus,
|
||||
|
||||
ChunkEus,
|
||||
ExtensionsEus [
|
||||
-- ListVPS,BaseVPS,ConsVPS,ConjVPS,ListVPI,BaseVPI,ConsVPI,ConjVPI,
|
||||
-- CompoundN,AdAdV,UttAdV,ApposNP,MkVPI, MkVPS, PredVPS, PassVPSlash, PassAgentVPSlash, CompoundAP,
|
||||
-- DirectComplVS, DirectComplVQ, FocusObjS
|
||||
-- , PastPartAP, PastPartAgentAP, PresPartAP, GerundNP, GerundAdv ---- not yet available for all languages
|
||||
WithoutVP, InOrderToVP -- , ByVP
|
||||
],
|
||||
DictionaryEus **
|
||||
|
||||
open ResEus, Prelude in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user