mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
mp3 example
This commit is contained in:
6
examples/mp3/Lexicon.gf
Normal file
6
examples/mp3/Lexicon.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
interface Lexicon = open Structural in {
|
||||
|
||||
oper
|
||||
play : TV ;
|
||||
song : N ;
|
||||
}
|
||||
9
examples/mp3/LexiconEng.gf
Normal file
9
examples/mp3/LexiconEng.gf
Normal 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" ;
|
||||
|
||||
}
|
||||
9
examples/mp3/LexiconFin.gf
Normal file
9
examples/mp3/LexiconFin.gf
Normal 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")) ;
|
||||
|
||||
}
|
||||
9
examples/mp3/LexiconFre.gf
Normal file
9
examples/mp3/LexiconFre.gf
Normal 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 ;
|
||||
|
||||
}
|
||||
8
examples/mp3/LexiconGer.gf
Normal file
8
examples/mp3/LexiconGer.gf
Normal 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" ;
|
||||
}
|
||||
9
examples/mp3/LexiconSwe.gf
Normal file
9
examples/mp3/LexiconSwe.gf
Normal 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
19
examples/mp3/MP3.gf
Normal 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
5
examples/mp3/MP3Eng.gf
Normal 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
5
examples/mp3/MP3Fin.gf
Normal 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
5
examples/mp3/MP3Fre.gf
Normal 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
5
examples/mp3/MP3Ger.gf
Normal 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
24
examples/mp3/MP3I.gf
Normal 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
5
examples/mp3/MP3Swe.gf
Normal 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) ;
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user