mp3 example

This commit is contained in:
aarne
2005-12-14 16:28:57 +00:00
parent b1543ab8bd
commit a470831560
19 changed files with 126 additions and 8 deletions

6
examples/mp3/Lexicon.gf Normal file
View File

@@ -0,0 +1,6 @@
interface Lexicon = open Structural in {
oper
play : TV ;
song : N ;
}

View File

@@ -0,0 +1,9 @@
instance LexiconEng of Lexicon = open StructuralEng, ParadigmsEng in {
oper
play = tvDir (vReg "play") ;
song = nReg "song" nonhuman ;
yesterday = npReg "Yesterday" ;
}

View File

@@ -0,0 +1,9 @@
instance LexiconFin of Lexicon = open StructuralFin, ParadigmsFin in {
oper
play = tvDir (vKattaa "soittaa" "soitan") ;
song = nRae "kappale" "kappaleena" ;
yesterday = UsePN (mkPN (nPuu "Yesterday")) ;
}

View File

@@ -0,0 +1,9 @@
instance LexiconFre of Lexicon = open StructuralFre, ParadigmsFre in {
oper
play = tvDir (vAimer "jouer") ;
song = nReg "chanson" feminine ;
yesterday = mkNP "Yesterday" masculine ;
}

View File

@@ -0,0 +1,8 @@
instance LexiconGer of Lexicon = open StructuralGer, ParadigmsGer in {
oper
play = tvDir (vWeak "spielen") ;
song = nBuch "lied" "lieder" ;
yesterday = npReg "Yesterday" ;
}

View File

@@ -0,0 +1,9 @@
instance LexiconSwe of Lexicon = open StructuralSwe, ParadigmsSwe in {
oper
play = tvDir (vKoka "spela") ;
song = nBil "låt" ;
yesterday = npReg "Yesterday" neutrum ;
}

19
examples/mp3/MP3.gf Normal file
View File

@@ -0,0 +1,19 @@
abstract MP3 = {
cat
Move ;
Song ;
fun
Play : Song -> Move ;
CanPlay : Song -> Move ;
WantPlay : Song -> Move ;
WhichPlay : Move ;
ThisSong : Song ;
This : Song ;
Yesterday : Song ;
---- MkSong : String -> Song ;
}

5
examples/mp3/MP3Eng.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:resource-0.6/english:resource-0.6/abstract:prelude
concrete MP3Eng of MP3 = MP3I with
(Structural = StructuralEng),
(Lexicon = LexiconEng) ;

5
examples/mp3/MP3Fin.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:resource-0.6/finnish:resource-0.6/abstract:prelude
concrete MP3Fin of MP3 = MP3I with
(Structural = StructuralFin),
(Lexicon = LexiconFin) ;

5
examples/mp3/MP3Fre.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:resource-0.6/french:resource-0.6/romance:resource-0.6/abstract:prelude
concrete MP3Fre of MP3 = MP3I with
(Structural = StructuralFre),
(Lexicon = LexiconFre) ;

5
examples/mp3/MP3Ger.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:resource-0.6/german:resource-0.6/abstract:prelude
concrete MP3Ger of MP3 = MP3I with
(Structural = StructuralGer),
(Lexicon = LexiconGer) ;

24
examples/mp3/MP3I.gf Normal file
View File

@@ -0,0 +1,24 @@
--# -path=.:resource-0.6/english:resource-0.6/abstract:prelude
incomplete concrete MP3I of MP3 = open Structural, Lexicon in {
flags startcat=Move ;
lincat
Move = Phr ;
Song = NP ;
lin
Play song = ImperOne (ImperVP (PosVG (PredTV play song))) ;
CanPlay song = QuestPhrase (QuestVP ThouNP (PosVG (PredVV CanVV (PredTV play song)))) ;
WantPlay song = IndicPhrase (PredVP INP (PosVG (PredVV WantVV (PredTV play song)))) ;
WhichPlay = QuestPhrase (IntVP (NounIPOne (UseN song)) (PosVG (PredPassV (VTrans play)))) ;
ThisSong = DetNP ThisDet (UseN song) ;
This = ThisNP ;
Yesterday = yesterday ;
---- MkSong : String -> Song ;
}

5
examples/mp3/MP3Swe.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:resource-0.6/swedish:resource-0.6/abstract:prelude
concrete MP3Swe of MP3 = MP3I with
(Structural = StructuralSwe),
(Lexicon = LexiconSwe) ;

View File

@@ -634,10 +634,10 @@ s ; s2 = [] ; isAux = False} ;
(try.s ! InfImp ++ try.s1) ; -- ... try
in
{s = \\b,v => if_then_Str b
(try.s ! v ++ try.s1 ++ to ++ run.s ! True ! InfImp)
(try.s ! v ++ try.s1)
(dont ! v) ;
s2 = \\b,v => if_then_Str b
(run.s2 ! True ! v)
(to ++ run.s ! True ! InfImp ++ run.s2 ! True ! v)
(trnot ++ run.s ! True ! InfImp ++ run.s2 ! True ! v) ;
isAuxT = taux ;
isAuxF = True

View File

@@ -2,7 +2,7 @@
concrete TestResourceEng of TestResource = StructuralEng ** open SyntaxEng, ParadigmsEng in {
flags startcat=Phr ; lexer=textlit ; parser=chart ; unlexer=text ;
flags startcat=Phr ; lexer=textlit ; unlexer=text ;
-- a random sample from the lexicon

View File

@@ -492,7 +492,7 @@ oper
-- Modal auxiliary verbs
verbumAux : (_,_,_,_,_ : Str) -> Verbum = \können,kann,konnte,könnte,gekonnt ->
let k = (verbumStrongLaufen können kann konnte könnte gekonnt)
let k = mkVerbum können kann kann konnte könnte gekonnt ;--- (verbumStrongLaufen können kann konnte könnte gekonnt)
in
table {
VInd Sg P1 => kann ;

View File

@@ -605,7 +605,7 @@ oper
complVerbVerb : VerbVerb -> VerbGroup -> VerbGroup = \will, essen ->
will ** {
s3 = \\b,_ => negation b ++
s3 = \\b,n => essen.s3 ! True ! n ++ negation b ++
essen.s2 ++ zuInfinitive will.isAux ++ essen.s ! VInf ;
s4 = essen.s4
} ;

View File

@@ -3,7 +3,7 @@
concrete TestResourceGer of TestResource = StructuralGer ** open SyntaxGer in {
flags startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;
flags startcat=Phr ; lexer=text ; unlexer=text ;
-- a random sample from the lexicon

View File

@@ -28,9 +28,9 @@ import System.IO.Unsafe
-- FIXME: get these from somewhere else
config = "/home/bjorn/projects/atkrec/atkrec.cfg"
config = "/home/aarne/atk/atkrec/atkrec.cfg"
res = "/home/bjorn/src/atk/Resources"
res = "/home/aarne/atk/atk/Resources"
hmmlist = res ++ "/UK_SI_ZMFCC/hmmlistbg"
mmf0 = res ++ "/UK_SI_ZMFCC/WI4"
mmf1 = res ++ "/UK_SI_ZMFCC/BGHMM2"