mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-27 21:42:50 -06:00
lib/src/translator: refactored wide-coverage translator grammar structured as described in lib/doc/translate.html. Implemented for Eng and Swe. To do: more languages, makefile entries (to be converted from entries for Parse), some internal refactoring in translator/Extensions.gf.
This commit is contained in:
39
lib/src/translator/TranslateEng.gf
Normal file
39
lib/src/translator/TranslateEng.gf
Normal file
@@ -0,0 +1,39 @@
|
||||
--# -path=.:../abstract:../english
|
||||
|
||||
concrete TranslateEng of Translate =
|
||||
TenseX - [Pol, PNeg, PPos],
|
||||
CatEng,
|
||||
NounEng - [PPartNP],
|
||||
AdjectiveEng,
|
||||
NumeralEng,
|
||||
SymbolEng [
|
||||
PN, Symb, String, CN, Card, NP, MkSymb, SymbPN, CNNumNP,
|
||||
addGenitiveS
|
||||
],
|
||||
ConjunctionEng,
|
||||
VerbEng - [SlashV2V, PassV2, UseCopula, ComplVV],
|
||||
AdverbEng,
|
||||
PhraseEng,
|
||||
SentenceEng - [UseCl], -- replaced by UseCl | ContractedUseCl
|
||||
QuestionEng,
|
||||
RelativeEng,
|
||||
IdiomEng [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP],
|
||||
ConstructionEng,
|
||||
DocumentationEng,
|
||||
|
||||
ExtensionsEng,
|
||||
DictionaryEng **
|
||||
open MorphoEng, ResEng, ParadigmsEng, (S = SentenceEng), (E = ExtraEng), Prelude in {
|
||||
|
||||
flags
|
||||
literal=Symb ;
|
||||
|
||||
-- exceptional linearizations
|
||||
lin
|
||||
UseCl t p cl = S.UseCl t p cl | E.ContractedUseCl t p cl ;
|
||||
|
||||
PPos = {s = [] ; p = CPos} ;
|
||||
PNeg = {s = [] ; p = CNeg True} | {s = [] ; p = CNeg False} ;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user