forked from GitHub/gf-core
better implementation of "how far" in Swedish; harmonized the type of HowFarBy
This commit is contained in:
@@ -114,7 +114,6 @@ gfdoc - a rudimentary GF document generator.
|
|||||||
{name = n ; isPron = False ; poss = mkQuant he_Pron} ; -- poss not used
|
{name = n ; isPron = False ; poss = mkQuant he_Pron} ; -- poss not used
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
-- NameString s = symb s ; --%
|
|
||||||
<pre>
|
<pre>
|
||||||
NameNN = symb "NN" ;
|
NameNN = symb "NN" ;
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,6 @@ Determiners.
|
|||||||
NameNN : Name ; -- the name "NN"
|
NameNN : Name ; -- the name "NN"
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
-- NameString : String -> Name ; ---- creates ambiguities with all words --%
|
|
||||||
<pre>
|
<pre>
|
||||||
NNumeral : Numeral -> Number ; -- numeral in words, e.g. "twenty"
|
NNumeral : Numeral -> Number ; -- numeral in words, e.g. "twenty"
|
||||||
</pre>
|
</pre>
|
||||||
@@ -144,7 +143,6 @@ structurally. However, these ones are mostly functorial.
|
|||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2> Words and idiomatic phrases of the Phrasebook</h2>
|
<h2> Words and idiomatic phrases of the Phrasebook</h2>
|
||||||
(c) 2009 Aarne Ranta under LGPL --%
|
|
||||||
<pre>
|
<pre>
|
||||||
abstract Words = Sentences ** {
|
abstract Words = Sentences ** {
|
||||||
|
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ abstract Words = Sentences ** {
|
|||||||
HowFarFrom : Place -> Place -> Question ; -- how far is the center from the hotel ?
|
HowFarFrom : Place -> Place -> Question ; -- how far is the center from the hotel ?
|
||||||
HowFarFromBy : Place -> Place -> ByTransport -> Question ;
|
HowFarFromBy : Place -> Place -> ByTransport -> Question ;
|
||||||
-- how far is the airport from the hotel by taxi ?
|
-- how far is the airport from the hotel by taxi ?
|
||||||
HowFarBy : Place -> Transport -> Question ; -- how far is the museum by bus ?
|
HowFarBy : Place -> ByTransport -> Question ; -- how far is the museum by bus ?
|
||||||
|
|
||||||
WhichTranspPlace : Transport -> Place -> Question ; -- which bus goes to the hotel
|
WhichTranspPlace : Transport -> Place -> Question ; -- which bus goes to the hotel
|
||||||
IsTranspPlace : Transport -> Place -> Question ; -- is there a metro to the airport ?
|
IsTranspPlace : Transport -> Place -> Question ; -- is there a metro to the airport ?
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ concrete WordsSwe of Words = SentencesSwe **
|
|||||||
University = mkPlace (mkN "universitet" "universitet") "på" ;
|
University = mkPlace (mkN "universitet" "universitet") "på" ;
|
||||||
Zoo = mkPlace (mkN "djurpark" "djurparker") "i" ;
|
Zoo = mkPlace (mkN "djurpark" "djurparker") "i" ;
|
||||||
|
|
||||||
CitRestaurant cit = mkCNPlace (mkCN cit (mkN "restaurang" "restauranger")) on_Prep to_Prep ;
|
CitRestaurant cit =
|
||||||
|
mkCNPlace (mkCN cit (mkN "restaurang" "restauranger")) on_Prep to_Prep ;
|
||||||
|
|
||||||
-- currencies
|
-- currencies
|
||||||
|
|
||||||
@@ -187,13 +188,15 @@ concrete WordsSwe of Words = SentencesSwe **
|
|||||||
-- transports
|
-- transports
|
||||||
|
|
||||||
HowFar place = mkQS (mkQCl far_IAdv place.name) ;
|
HowFar place = mkQS (mkQCl far_IAdv place.name) ;
|
||||||
HowFarFrom x y = mkQS (mkQCl (mkIAdv far_IAdv (SyntaxSwe.mkAdv from_Prep x.name)) y.name) ;
|
HowFarFrom place x =
|
||||||
HowFarFromBy x y t =
|
mkQS (mkQCl far_IAdv (mkCl place.name (SyntaxSwe.mkAdv from_Prep x.name))) ;
|
||||||
mkQS (mkQCl (mkIAdv (mkIAdv far_IAdv (SyntaxSwe.mkAdv from_Prep x.name)) t) y.name) ;
|
HowFarFromBy place x t =
|
||||||
HowFarBy y t = mkQS (mkQCl (mkIAdv far_IAdv t.by) y.name) ;
|
mkQS (mkQCl far_IAdv (mkCl place.name
|
||||||
|
(mkVP (mkVP (SyntaxSwe.mkAdv from_Prep x.name)) t))) ;
|
||||||
|
HowFarBy place t =
|
||||||
|
mkQS (mkQCl far_IAdv (mkCl place.name t)) ;
|
||||||
|
-- mkQS (mkQCl (mkIAdv far_IAdv t) y.name) ;
|
||||||
|
|
||||||
oper far_IAdv = ExtraSwe.IAdvAdv L.far_Adv ;
|
|
||||||
lin
|
|
||||||
WhichTranspPlace trans place =
|
WhichTranspPlace trans place =
|
||||||
mkQS (mkQCl (mkIP which_IDet trans.name) (mkVP (mkVP L.go_V) place.to)) ;
|
mkQS (mkQCl (mkIP which_IDet trans.name) (mkVP (mkVP L.go_V) place.to)) ;
|
||||||
|
|
||||||
@@ -235,4 +238,6 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkSuperl : A -> Det = \a -> mkDet the_Art (mkOrd a) ;
|
mkSuperl : A -> Det = \a -> mkDet the_Art (mkOrd a) ;
|
||||||
|
|
||||||
|
far_IAdv = ExtraSwe.IAdvAdv L.far_Adv ;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user