summaryrefslogtreecommitdiff
path: root/grammars/health/HealthSwe.gf
blob: 0c3a369ef55cd2d674a1e93b8f5f803ac6052071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
-- The UTF8 version currently differs from the non-UTF8 !!!

-- The difference with the UTF8 version is that 
-- operations "verbVara" (vbVara see ExtraSweU.gf) 
-- and "predAP" (predAP, see ExtraSweU.gf) need to be replaced
-- using the UTF8 encoding (because of the UTF8 problem 
-- with UTF8 resource grammars) 

-- use this path to read the grammar from the same directory

--# -path=.:../../lib/resource-0.6/abstract:../../lib/prelude:../../lib/resource-0.6/swedish
concrete HealthSwe of Health = open PredicationSwe, ResourceSwe, Prelude, SyntaxSwe, ExtraSwe, ParadigmsSwe, ResourceExtSwe in {

flags 
  startcat=Phr ; lexer=text ; parser=chart ; unlexer=text ;

lincat 
  Patient = patientNPCategory ;
  BodyPart = CN ;
  Symptom = NP ;
  SymptomDegree = AP ;
  Prop = S ;
  Illness = CN ; 
  Condition = VP ;
  Specialization = CN ;
  Medicine  = NP ;

lin 
  And x y = ConjS AndConj (TwoS x y) ; 

  ShePatient = mkPronPatient hon_35 ;
  TheyPatient = mkPronPatient de_38 ;
  IPatientHe = mkPronPatient jag_32 ;
  IPatientShe = mkPronPatient jag_32 ;
  HePatient = mkPronPatient han_34 ;
  WePatient = mkPronPatient vi_36 ;

  Influenza = UseN (nApa "influens") ; 
  Malaria = UseN (nApa "malari"); 
  Diarrhea = UseN (nApa "diarré"); 
  SkinAllergy = UseN (nApa "hudallergi");  
  Heartburn = UseN (nApa "halsbränna");  
  Rheumatism = UseN (nBil "reumatism");  
  Cystitis = UseN (nRisk "urinvägsinfektion");  
  Asthma = UseN (nApa "astma"); 
  Arthritis = UseN (nApa "artrit"); 
  Diabetes = UseN (nBil "diabetes"); 
  Tonsillitis = UseN (nBil "halsfluss"); 
  Constipation = UseN (nBil "förstoppning"); 
  
  Dentist  = UseN (nKikare "tandläkare") ;
  Gynecologist = UseN (nRisk "gynekolog"); 
  Urologist= UseN (nRisk "urolog"); 
  Pediatrician = UseN (nKikare "barnläkare"); 
  Physician = UseN (nKikare "läkare"); 
  Dermatologist = UseN (nKikare "hudläkare"); 
  Cardiologist = UseN (nRisk "kardiolog"); 
  Neuropathologist = UseN (nRisk "neurolog"); 
  Ophthalmologist = UseN (nKikare "ögönläkare"); 
  Surgeon = UseN (nRisk "kirurg"); 

  SleepingPeels = IndefManyNP (UseN (nRisk "sömntablett")) ;
  Sedative = IndefOneNP (UseN (nPapper "lugnande")) ;
  Vitamins = IndefManyNP (UseN (nPapper "vitaminpiller")) ;
  EyeDrops = IndefManyNP (UseN (nPojke "ögondroppe")) ;
  Antibiotics = IndefManyNP (UseN (nPapper "antibiotika")) ;
  Viagra = MassNP (UseN (nBil "viagra")) ;
  Laxative = IndefOneNP (UseN (nPapper "laxer")) ;
  Insulin = MassNP (UseN (nRep "insulin")) ;
  Antidepressant = IndefOneNP ( ModAdj (AdjP1 (adjReg "antidepressiv")) (UseN (nRep "läkemedel"))) ;
  PainKiller = IndefOneNP (UseN (nBil "smärtstillande")) ;

  CatchCold = PosVG ( PredAP( AdjP1 (extAdjective (aGrund("förkyl")) ** {lock_Adj1 = <>}) ));
  Pregnant = PosVG ( PredAP( AdjP1 (extAdjective (aGrund("gravi") )** {lock_Adj1 = <>}) ));
 
  BeInCondition = PredVP ; 
  HaveIllness patient illness = predV2 (mkDirectVerb verbHa** {lock_TV =<>}) patient 
                                (DetNP (nullDet  ** {lock_Det = <>}) illness) ;

  NeedMedicine = predV2 (mkDirectVerb verbBehova** {lock_TV =<>}) ; 
  TakeMedicine = predV2 (mkDirectVerb verbTa** {lock_TV =<>}) ;
 
  NeedDoctor patient illness = predV2 (mkDirectVerb verbBehova** {lock_TV =<>}) patient                                 
                                (DetNP (enDet  ** {lock_Det = <>}) illness) ;
  Fever = DetNP (nullDet  ** {lock_Det = <>}) (UseN (nRisk "feber")) ;
 
  Complain = predV2 (mkDirectVerb verbHa ** {lock_TV =<>}) ;
  Broken patient head = predV2 (mkTransVerb verbHa "brutit" ** {lock_TV =<>} ) patient 
                        (defNounPhrase patient.n head ** {lock_NP =<>}) ;

  PainIn patient head = predV2 (mkDirectVerb verbHa** {lock_TV =<>}) patient 
   (
    DetNP (nullDet  ** {lock_Det = <>}) 
    ( AppFun 
       ((mkFun (nBil "ont") "i") ** {lock_Fun = <>})
       ((defNounPhrase patient.n head)** {lock_NP = <>})
    )
   ) ;

  Head = UseN (nRep "huvud") ;
  Leg = UseN (nRep "ben") ;
  Stomac = UseN  (nPojke "mage")  ;
  Throat = UseN  (nBil "hals") ;
  Ear = UseN  (mkN "öra" "örat" "öron" "öronen" neutrum nonmasculine) ;
  Chest = UseN (nRep "bröst") ;
  Foot = UseN  (mkN "fot" "foten" "fötter" "fötterna" utrum nonmasculine) ;
  Arm = UseN  (mkN "hand" "handen" "händer" "händerna" utrum nonmasculine) ;
  Back = UseN  (nBil "rygg") ;
  Shoulder = UseN  (nNyckel "axel") ;

--  High = AdjP1 (adjReg "hög") ;
--  Terrible = AdjP1 (adjReg "hemsk") ;
--  FeverMod degree = DetNP (nullDet  ** {lock_Det = <>}) (ModAdj degree (UseN (nKikare "feb") ) ;
--  PainInMod patient head degree =  predV2 (mkDirectVerb verbHa** {lock_TV =<>}) patient
--    (
--      DetNP (nullDet  ** {lock_Det = <>}) 
--      ( modCommNounPhrase degree 
--           ( AppFun 
--               ((mkFun (extCommNoun nonmasculine (sBil "ont")) "i") ** {lock_Fun = <>}) 
--               ((defNounPhrase patient.n head)** {lock_NP = <>})
--           ) ** {lock_CN = <>}
--      )
--    ) ;

  Injured = injuredBody ;

};