diff --git a/examples/phrasebook/SentencesTha.gf b/examples/phrasebook/SentencesTha.gf index 55662e1df..2e2aebe09 100644 --- a/examples/phrasebook/SentencesTha.gf +++ b/examples/phrasebook/SentencesTha.gf @@ -1,7 +1,7 @@ concrete SentencesTha of Sentences = NumeralTha ** SentencesI - [ PGreetingMale, PGreetingFemale, GObjectPlease, - ACitizen, WherePlace, WherePerson + ACitizen ] with (Syntax = SyntaxTha), (Symbolic = SymbolicTha), @@ -17,11 +17,6 @@ lin ACitizen p n = mkCl p.name (mkVP (mkCN n (P.personN R.khon_s))) ; - WherePlace place = mkQS (mkQCl where_IAdv (mkCl place.name yuu_V)) ; - WherePerson person = mkQS (mkQCl where_IAdv (mkCl person.name yuu_V)) ; - oper - yuu_V : V = R.regV "อยู่" ; - thpron = R.thpron ; } diff --git a/lib/doc/Compare.hs b/lib/doc/Compare.hs index e40959b1b..1965fe96b 100644 --- a/lib/doc/Compare.hs +++ b/lib/doc/Compare.hs @@ -14,7 +14,7 @@ mkExx sss = case sss of (s1:ss1,s2:ss2) | isMsg s1 -> mkExx (ss1,s2:ss2) (s1:ss1,s2:ss2) | isMsg s2 -> mkExx (s1:ss1,ss2) (s1:ss1,s2:ss2) | s1 /= s2 -> - putStrLn (drops s1) >> putStrLn (drops s2) >> putStrLn [] >> mkExx (ss1,ss2) -- show the strings + putStrLn (drops s1) >> putStrLn (filter (not . (==' ')) (drops s2)) >> putStrLn [] >> mkExx (ss1,ss2) -- show strings (s1:ss1,s2:ss2) | s1 == s2 && not (isJunk s1) -> putStrLn (drops s1) >> mkExx (ss1,ss2) -- show the term (s1:ss1,s2:ss2) | s1 == s2 -> mkExx (ss1,ss2) diff --git a/lib/doc/MkExxTable.hs b/lib/doc/MkExxTable.hs index e8d013fb3..19b057d2e 100644 --- a/lib/doc/MkExxTable.hs +++ b/lib/doc/MkExxTable.hs @@ -68,9 +68,10 @@ prApiExx aexx = unlines prApiEx :: M.Map String String -> [String] prApiEx apexx = case M.toList apexx of (a,e):lexx -> (a ++ ": ``" ++ unwords (words e) ++ "``"): - [l ++ ": //" ++ mkEx e ++ "//" | (l,e) <- lexx] + [l ++ ": //" ++ mkEx l e ++ "//" | (l,e) <- lexx] -mkEx = unwords . bind . mkE . words where +mkEx l = unws . bind . mkE . words where + unws = if l == "Tha" then concat else unwords mkE e = case e of "atomic":"term":_ -> ["*"] "[]":_ -> ["''"] diff --git a/lib/doc/api-examples.txt b/lib/doc/api-examples.txt index 3101ebf67..9b781cd3a 100644 --- a/lib/doc/api-examples.txt +++ b/lib/doc/api-examples.txt @@ -742,7 +742,7 @@ mkAdv during_Prep it_NP either7or_DConj : Conj -- either...or mkAdv either7or_DConj here_Adv there_Adv every_Det : Det -every_Det +mkUtt (mkNP every_Det woman_N) everybody_NP : NP -- everybody mkUtt everybody_NP everything_NP : NP @@ -750,7 +750,7 @@ mkUtt everything_NP everywhere_Adv : Adv everywhere_Adv few_Det : Det -few_Det +mkUtt (mkNP few_Det women_N) for_Prep : Prep mkAdv for_Prep it_NP from_Prep : Prep @@ -788,7 +788,7 @@ more_CAdv most_Predet : Predet most_Predet much_Det : Det -much_Det +mkUtt (mkNP much_Det wine_N) must_VV : VV must_VV no_Utt : Utt @@ -814,9 +814,9 @@ mkUtt (mkNP she_Pron) so_AdA : AdA so_AdA someSg_Det : Det -someSg_Det +mkUtt (mkNP someSg_Det wine_N) somePl_Det : Det -somePl_Det +mkUtt (mkNP somePl_Det woman_N) somebody_NP : NP mkUtt somebody_NP something_NP : NP diff --git a/lib/doc/synopsis-intro.txt b/lib/doc/synopsis-intro.txt index 2b83aee3f..8447d4fda 100644 --- a/lib/doc/synopsis-intro.txt +++ b/lib/doc/synopsis-intro.txt @@ -23,12 +23,12 @@ constructing trees in them. - [Chapter 2 #toc5]: syntactic construction functions, with cross-links and examples. - [Chapter 3 #toc83]: morphological paradigms. -- [Chapter 4 #toc102]: additional libraries. -- [Chapter 5 #toc109]: how to "browse" the library by +- [Chapter 4 #toc103]: additional libraries. +- [Chapter 5 #toc110]: how to "browse" the library by loading the grammars into the ``gf`` command editor. -- [Chapter 6 #toc110]: a brief example of how application grammars can +- [Chapter 6 #toc111]: a brief example of how application grammars can use the resource modules. -- [Detailed table of contents #toc111]. +- [Detailed table of contents #toc112]. Other relevant documents: diff --git a/lib/doc/synopsis.html b/lib/doc/synopsis.html index 6964c4de5..f6b6f1dd1 100644 --- a/lib/doc/synopsis.html +++ b/lib/doc/synopsis.html @@ -37,12 +37,12 @@ constructing trees in them.
  • Chapter 2: syntactic construction functions, with cross-links and examples.
  • Chapter 3: morphological paradigms. -
  • Chapter 4: additional libraries. -
  • Chapter 5: how to "browse" the library by +
  • Chapter 4: additional libraries. +
  • Chapter 5: how to "browse" the library by loading the grammars into the gf command editor. -
  • Chapter 6: a brief example of how application grammars can +
  • Chapter 6: a brief example of how application grammars can use the resource modules. -
  • Detailed table of contents. +
  • Detailed table of contents.

    @@ -527,7 +527,7 @@ Lexical category, constructors given in comparAP A -> AP -

    warmer
    +
    warmer
    mkAP @@ -537,12 +537,12 @@ Lexical category, constructors given in mkAP A -> NP -> AP -
    warmer than Paris
    +
    warmer than Paris
    mkAP A2 -> NP -> AP -
    married to her
    +
    married to her
    mkAP @@ -552,57 +552,57 @@ Lexical category, constructors given in mkAP AP -> S -> AP -
    it is good that she sleeps
    +
    it is good that she sleeps
    mkAP AP -> QS -> AP -
    it is uncertain who sleeps
    +
    it is uncertain who sleeps
    mkAP AP -> VP -> AP -
    she is ready to sleep
    +
    she is ready to sleep
    mkAP AP -> SC -> AP -
    she is ready to sleep
    +
    she is ready to sleep
    mkAP AdA -> A -> AP -
    very old
    +
    very old
    mkAP AdA -> AP -> AP -
    very very old
    +
    very very old
    mkAP Conj -> AP -> AP -> AP -
    old or young
    +
    old or young
    mkAP Conj -> ListAP -> AP -
    old , big and warm
    +
    old , big and warm
    mkAP Ord -> AP -
    oldest
    +
    oldest
    mkAP CAdv -> AP -> NP -> AP -
    as old as she
    +
    as old as she
    reflAP A2 -> AP -
    married to itself
    +
    married to itself
    @@ -618,7 +618,7 @@ Lexical category, constructors given in almost_AdA AdA -
    almost red
    +
    almost red
    quite_Adv @@ -654,22 +654,22 @@ Lexical category, constructors given in almost_AdN AdN -
    almost eight
    +
    almost eight
    at_least_AdN AdN -
    at least eight
    +
    at least eight
    at_most_AdN AdN -
    at most eight
    +
    at most eight
    mkAdN CAdv -> AdN -
    more than eight
    +
    more than eight
    @@ -726,37 +726,37 @@ Lexical category, constructors given in mkAdv Prep -> NP -> Adv -
    in the house
    +
    in the house
    mkAdv Subj -> S -> Adv -
    when she sleeps
    +
    when she sleeps
    mkAdv CAdv -> A -> NP -> Adv -
    more warmly than he
    +
    more warmly than he
    mkAdv CAdv -> A -> S -> Adv -
    more warmly than he runs
    +
    more warmly than he runs
    mkAdv AdA -> Adv -> Adv -
    very warmly
    +
    very warmly
    mkAdv Conj -> Adv -> Adv -> Adv -
    here and now
    +
    here and now
    mkAdv Conj -> ListAdv -> Adv -
    with her , here and now
    +
    with her , here and now
    somewhere_Adv @@ -792,12 +792,12 @@ Lexical category, constructors given in anteriorAnt Ant -
    she has slept
    +
    she has slept
    simultaneousAnt Ant -
    she sleeps
    +
    she sleeps
    @@ -844,12 +844,12 @@ Lexical category, constructors given in mkCN N2 -> NP -> CN -
    mother of the king
    +
    mother of the king
    mkCN N3 -> NP -> NP -> CN -
    distance from this city to Paris
    +
    distance from this city to Paris
    mkCN @@ -864,72 +864,72 @@ Lexical category, constructors given in mkCN A -> N -> CN -
    big house
    +
    big house
    mkCN A -> CN -> CN -
    big blue house
    +
    big blue house
    mkCN AP -> N -> CN -
    very big house
    +
    very big house
    mkCN AP -> CN -> CN -
    very big blue house
    +
    very big blue house
    mkCN N -> RS -> CN -
    man whom she loves
    +
    man whom she loves
    mkCN CN -> RS -> CN -
    old man whom she loves
    +
    old man whom she loves
    mkCN N -> Adv -> CN -
    house on the hill
    +
    house on the hill
    mkCN CN -> Adv -> CN -
    big house on the hill
    +
    big house on the hill
    mkCN CN -> S -> CN -
    almost five
    +
    almost five
    mkCN CN -> QS -> CN -
    almost five
    +
    almost five
    mkCN CN -> VP -> CN -
    reason to sleep
    +
    reason to sleep
    mkCN CN -> SC -> CN -
    reason to sleep
    +
    reason to sleep
    mkCN N -> NP -> CN -
    king John
    +
    king John
    mkCN CN -> NP -> CN -
    old king John
    +
    old king John
    @@ -976,122 +976,122 @@ Lexical category, constructors given in genericCl VP -> Cl -
    one sleeps
    +
    one sleeps
    mkCl NP -> V -> Cl -
    she sleeps
    +
    she sleeps
    mkCl NP -> V2 -> NP -> Cl -
    she loves him
    +
    she loves him
    mkCl NP -> V3 -> NP -> NP -> Cl -
    she sends it to him
    +
    she sends it to him
    mkCl NP -> VV -> VP -> Cl -
    she wants to sleep
    +
    she wants to sleep
    mkCl NP -> VS -> S -> Cl -
    she says that I sleep
    +
    she says that I sleep
    mkCl NP -> VQ -> QS -> Cl -
    she wonders who sleeps
    +
    she wonders who sleeps
    mkCl NP -> VA -> A -> Cl -
    she becomes old
    +
    she becomes old
    mkCl NP -> VA -> AP -> Cl -
    she becomes very old
    +
    she becomes very old
    mkCl NP -> V2A -> NP -> A -> Cl -
    she paints it red
    +
    she paints it red
    mkCl NP -> V2A -> NP -> AP -> Cl -
    she paints it red
    +
    she paints it red
    mkCl NP -> V2S -> NP -> S -> Cl -
    she answers to him that we sleep
    +
    she answers to him that we sleep
    mkCl NP -> V2Q -> NP -> QS -> Cl -
    she asks him who sleeps
    +
    she asks him who sleeps
    mkCl NP -> V2V -> NP -> VP -> Cl -
    she begs him to sleep
    +
    she begs him to sleep
    mkCl NP -> A -> Cl -
    she is old
    +
    she is old
    mkCl NP -> A -> NP -> Cl -
    she is older than he
    +
    she is older than he
    mkCl NP -> A2 -> NP -> Cl -
    she is married to him
    +
    she is married to him
    mkCl NP -> AP -> Cl -
    she is very old
    +
    she is very old
    mkCl NP -> NP -> Cl -
    she is the woman
    +
    she is the woman
    mkCl NP -> N -> Cl -
    she is a woman
    +
    she is a woman
    mkCl NP -> CN -> Cl -
    she is an old woman
    +
    she is an old woman
    mkCl NP -> Adv -> Cl -
    she is here
    +
    she is here
    mkCl NP -> VP -> Cl -
    she always sleeps
    +
    she always sleeps
    mkCl N -> Cl -
    there is a house
    +
    there is a house
    mkCl @@ -1101,17 +1101,17 @@ Lexical category, constructors given in mkCl NP -> Cl -
    there are many houses
    +
    there are many houses
    mkCl NP -> RS -> Cl -
    it is she who sleeps
    +
    it is she who sleeps
    mkCl Adv -> S -> Cl -
    it is here that she sleeps
    +
    it is here that she sleeps
    mkCl @@ -1121,12 +1121,12 @@ Lexical category, constructors given in mkCl VP -> Cl -
    it is raining
    +
    it is raining
    mkCl SC -> VP -> Cl -
    that she sleeps is good
    +
    that she sleeps is good
    @@ -1142,32 +1142,32 @@ Lexical category, constructors given in mkClSlash NP -> VPSlash -> ClSlash -
    whom does she see
    +
    whom does she see
    mkClSlash NP -> V2 -> ClSlash -
    whom does she see
    +
    whom does she see
    mkClSlash NP -> VV -> V2 -> ClSlash -
    whom does she want to see
    +
    whom does she want to see
    mkClSlash Cl -> Prep -> ClSlash -
    with whom does she sleep
    +
    with whom does she sleep
    mkClSlash ClSlash -> Adv -> ClSlash -
    whom does she see today
    +
    whom does she see today
    mkClSlash NP -> VS -> SSlash -> ClSlash -
    whom does she know that we hadn't seen
    +
    whom does she know that we hadn't seen
    @@ -1188,12 +1188,12 @@ Lexical category, constructors given in mkComp NP -> Comp -
    this man
    +
    this man
    mkComp Adv -> Comp -
    here
    +
    here
    @@ -1209,27 +1209,27 @@ Lexical category, constructors given in and_Conj Conj -
    here and now
    +
    here and now
    both7and_DConj Conj -
    both here and there
    +
    both here and there
    either7or_DConj Conj -
    either here or there
    +
    either here or there
    if_then_Conj Conj -
    if here then there
    +
    if here then there
    or_Conj Conj -
    here or there
    +
    here or there
    @@ -1260,17 +1260,17 @@ Lexical category, constructors given in every_Det Det -
    every
    +
    every woman
    few_Det Det -
    few
    +
    constant not found: women_N
    many_Det Det -
    many houses
    +
    many houses
    mkDet @@ -1325,22 +1325,22 @@ Lexical category, constructors given in much_Det Det -
    much
    +
    much wine
    somePl_Det Det -
    some
    +
    some women
    someSg_Det Det -
    some
    +
    some wine
    that_Det Det -
    that woman
    +
    that woman
    thePl_Det @@ -1360,17 +1360,17 @@ Lexical category, constructors given in these_Det Det -
    these women
    +
    these women
    this_Det Det -
    this woman
    +
    this woman
    those_Det Det -
    those women
    +
    those women
    @@ -1457,7 +1457,7 @@ Lexical category, constructors given in mkDigits Dig -> Digits -> Digits -
    1 , 2 3 3 , 4 8 6
    +
    1 , 2 3 3 , 4 8 6
    @@ -1483,12 +1483,12 @@ Lexical category, constructors given in mkIAdv Prep -> IP -> IAdv -
    in which city
    +
    in which city
    mkIAdv IAdv -> Adv -> IAdv -
    where in Paris
    +
    where in Paris
    when_IAdv @@ -1540,27 +1540,27 @@ Lexical category, constructors given in how8many_IDet IDet -
    how many houses
    +
    how many houses
    mkIDet IQuant -> Num -> IDet -
    which houses
    +
    which houses
    mkIDet IQuant -> IDet -
    which house
    +
    which house
    whichPl_IDet IDet -
    which houses
    +
    which houses
    which_IDet IDet -
    which house
    +
    which house
    @@ -1576,37 +1576,37 @@ Lexical category, constructors given in mkIP IDet -> CN -> IP -
    which five big cities
    +
    which five big cities
    mkIP IDet -> N -> IP -
    which five cities
    +
    which five cities
    mkIP IDet -> IP -
    which five
    +
    which five
    mkIP IQuant -> CN -> IP -
    which big city
    +
    which big city
    mkIP IQuant -> Num -> CN -> IP -
    which five big cities
    +
    which five big cities
    mkIP IQuant -> N -> IP -
    which city
    +
    which city
    mkIP IP -> Adv -> IP -
    who in Paris
    +
    who in Paris
    whatPl_IP @@ -1652,7 +1652,7 @@ Lexical category, constructors given in which_IQuant IQuant -
    which house
    +
    which house
    @@ -1668,17 +1668,17 @@ Lexical category, constructors given in mkImp VP -> Imp -
    come to my house
    +
    come to my house
    mkImp V -> Imp -
    come
    +
    come
    mkImp V2 -> NP -> Imp -
    buy it
    +
    buy it
    @@ -1694,17 +1694,17 @@ Lexical category, constructors given in pluralImpForm ImpForm -
    be men
    +
    be men
    politeImpForm ImpForm -
    be a man
    +
    be a man
    singularImpForm ImpForm -
    be a man
    +
    be a man
    @@ -1882,52 +1882,52 @@ Lexical category, constructors given in mkNP Quant -> N -> NP -
    this man
    +
    this man
    mkNP Quant -> CN -> NP -
    this old man
    +
    this old man
    mkNP Quant -> Num -> CN -> NP -
    these five old men
    +
    these five old men
    mkNP Quant -> Num -> N -> NP -
    these five men
    +
    these five men
    mkNP Det -> CN -> NP -
    the five old men
    +
    the five old men
    mkNP Det -> N -> NP -
    the five men
    +
    the five men
    mkNP Numeral -> CN -> NP -
    fifty old men
    +
    fifty old men
    mkNP Numeral -> N -> NP -
    fifty men
    +
    fifty men
    mkNP Digits -> CN -> NP -
    5 1 old men
    +
    5 1 old men
    mkNP Digits -> N -> NP -
    5 1 men
    +
    5 1 men
    mkNP @@ -1942,12 +1942,12 @@ Lexical category, constructors given in mkNP Pron -> CN -> NP -
    my old man
    +
    my old man
    mkNP Pron -> N -> NP -
    my man
    +
    my man
    mkNP @@ -1967,17 +1967,17 @@ Lexical category, constructors given in mkNP Quant -> Num -> NP -
    these five
    +
    these five
    mkNP Det -> NP -
    the five best
    +
    the five best
    mkNP CN -> NP -
    old beer
    +
    old beer
    mkNP @@ -1987,32 +1987,32 @@ Lexical category, constructors given in mkNP Predet -> NP -> NP -
    only this woman
    +
    only this woman
    mkNP NP -> V2 -> NP -
    the man seen
    +
    the man seen
    mkNP NP -> Adv -> NP -
    Paris today
    +
    Paris today
    mkNP NP -> RS -> NP -
    John , who walks
    +
    John , who walks
    mkNP Conj -> NP -> NP -> NP -
    this woman or John
    +
    this woman or John
    mkNP Conj -> ListNP -> NP -
    this woman , John or I
    +
    this woman , John or I
    nobody_NP @@ -2103,12 +2103,12 @@ Lexical category, constructors given in mkNum Numeral -> Num -
    twenty
    +
    twenty
    mkNum Digits -> Num -
    2 1
    +
    2 1
    mkNum @@ -2118,12 +2118,12 @@ Lexical category, constructors given in mkNum Card -> Num -
    almost five
    +
    almost five
    mkNum AdN -> Card -> Num -
    almost five
    +
    almost five
    pluralNum @@ -2159,12 +2159,12 @@ Lexical category, constructors given in mkNumeral Sub1000 -> Numeral -
    nine hundred and ninety - nine
    +
    nine hundred and ninety - nine
    mkNumeral Sub1000 -> Sub1000 -> Numeral -
    nine hundred and ninety - nine thousand nine hundred and ninety - nine
    +
    nine hundred and ninety - nine thousand nine hundred and ninety - nine
    mkNumeral @@ -2174,7 +2174,7 @@ Lexical category, constructors given in thousandfoldNumeral Sub1000 -> Numeral -
    nine hundred and ninety - nine thousand
    +
    nine hundred and ninety - nine thousand
    @@ -2205,7 +2205,7 @@ Lexical category, constructors given in mkOrd A -> Ord -
    smallest
    +
    smallest
    @@ -2226,7 +2226,7 @@ Lexical category, constructors given in mkPConj Conj -> PConj -
    and now
    +
    and now
    otherwise_PConj @@ -2260,27 +2260,27 @@ Lexical category, constructors given in mkPhr (PConj) -> Utt -> (Voc) -> Phr -
    but sleep , my friend
    +
    but sleep , my friend
    mkPhr S -> Phr -
    she won't sleep
    +
    she won't sleep
    mkPhr Cl -> Phr -
    she sleeps
    +
    she sleeps
    mkPhr QS -> Phr -
    would she sleep
    +
    would she sleep
    mkPhr Imp -> Phr -
    sleep
    +
    sleep
    @@ -2296,12 +2296,12 @@ Lexical category, constructors given in negativePol Pol -
    she doesn't sleep
    +
    she doesn't sleep
    positivePol Pol -
    she sleeps
    +
    she sleeps
    @@ -2317,7 +2317,7 @@ Lexical category, constructors given in all_Predet Predet -
    all the men
    +
    all the men
    most_Predet @@ -2327,7 +2327,7 @@ Lexical category, constructors given in not_Predet Predet -
    not everybody
    +
    not everybody
    only_Predet @@ -2348,27 +2348,27 @@ Lexical category, constructors given in above_Prep Prep -
    above it
    +
    above it
    after_Prep Prep -
    after it
    +
    after it
    before_Prep Prep -
    before it
    +
    before it
    behind_Prep Prep -
    behind it
    +
    behind it
    between_Prep Prep -
    between you and me
    +
    between you and me
    by8agent_Prep @@ -2378,42 +2378,42 @@ Lexical category, constructors given in by8means_Prep Prep -
    by it
    +
    by it
    during_Prep Prep -
    during it
    +
    during it
    except_Prep Prep -
    except it
    +
    except it
    for_Prep Prep -
    for it
    +
    for it
    from_Prep Prep -
    from it
    +
    from it
    in8front_Prep Prep -
    in front of it
    +
    in front of it
    in_Prep Prep -
    in it
    +
    in it
    on_Prep Prep -
    on it
    +
    on it
    part_Prep @@ -2423,32 +2423,32 @@ Lexical category, constructors given in possess_Prep Prep -
    of it
    +
    of it
    through_Prep Prep -
    through it
    +
    through it
    to_Prep Prep -
    to it
    +
    to it
    under_Prep Prep -
    under it
    +
    under it
    with_Prep Prep -
    with it
    +
    with it
    without_Prep Prep -
    without it
    +
    without it
    @@ -2546,152 +2546,152 @@ Lexical category, constructors given in mkQCl Cl -> QCl -
    does she sleep
    +
    does she sleep
    mkQCl IP -> VP -> QCl -
    who always sleeps
    +
    who always sleeps
    mkQCl IP -> V -> QCl -
    who sleeps
    +
    who sleeps
    mkQCl IP -> V2 -> NP -> QCl -
    who loves her
    +
    who loves her
    mkQCl IP -> V3 -> NP -> NP -> QCl -
    who sends it to her
    +
    who sends it to her
    mkQCl IP -> VV -> VP -> QCl -
    who wants to sleep
    +
    who wants to sleep
    mkQCl IP -> VS -> S -> QCl -
    who says that I sleep
    +
    who says that I sleep
    mkQCl IP -> VQ -> QS -> QCl -
    who wonders who sleeps
    +
    who wonders who sleeps
    mkQCl IP -> VA -> A -> QCl -
    who becomes old
    +
    who becomes old
    mkQCl IP -> VA -> AP -> QCl -
    who becomes very old
    +
    who becomes very old
    mkQCl IP -> V2A -> NP -> A -> QCl -
    who paints it red
    +
    who paints it red
    mkQCl IP -> V2A -> NP -> AP -> QCl -
    who paints it very red
    +
    who paints it very red
    mkQCl IP -> V2S -> NP -> S -> QCl -
    who answers to him that we sleep
    +
    who answers to him that we sleep
    mkQCl IP -> V2Q -> NP -> QS -> QCl -
    who asks him who sleeps
    +
    who asks him who sleeps
    mkQCl IP -> V2V -> NP -> VP -> QCl -
    who begs him to sleep
    +
    who begs him to sleep
    mkQCl IP -> A -> QCl -
    who is old
    +
    who is old
    mkQCl IP -> A -> NP -> QCl -
    who is older than he
    +
    who is older than he
    mkQCl IP -> A2 -> NP -> QCl -
    who is married to him
    +
    who is married to him
    mkQCl IP -> AP -> QCl -
    who is very old
    +
    who is very old
    mkQCl IP -> NP -> QCl -
    who is the woman
    +
    who is the woman
    mkQCl IP -> N -> QCl -
    who is a woman
    +
    who is a woman
    mkQCl IP -> CN -> QCl -
    who is an old woman
    +
    who is an old woman
    mkQCl IP -> Adv -> QCl -
    who is here
    +
    who is here
    mkQCl IP -> NP -> V2 -> QCl -
    who is her
    +
    who is her
    mkQCl IP -> ClSlash -> QCl -
    whom does she love today
    +
    whom does she love today
    mkQCl IAdv -> Cl -> QCl -
    why does she sleep
    +
    why does she sleep
    mkQCl Prep -> IP -> Cl -> QCl -
    with whom does she sleep
    +
    with whom does she sleep
    mkQCl IAdv -> NP -> QCl -
    where is she
    +
    where is she
    mkQCl IComp -> NP -> QCl -
    who is this man
    +
    who is this man
    mkQCl IP -> QCl -
    which city is there
    +
    which city is there
    @@ -2707,12 +2707,12 @@ Lexical category, constructors given in mkQS (Tense) -> (Ant) -> (Pol) -> QCl -> QS -
    who wouldn't have slept
    +
    who wouldn't have slept
    mkQS Cl -> QS -
    does she sleep
    +
    does she sleep
    @@ -2733,17 +2733,17 @@ Lexical category, constructors given in mkQuant Pron -> Quant -
    my house
    +
    my house
    no_Quant Quant -
    no house
    +
    no house
    that_Quant Quant -
    that house
    +
    that house
    the_Quant @@ -2753,7 +2753,7 @@ Lexical category, constructors given in this_Quant Quant -
    this house
    +
    this house
    @@ -2769,122 +2769,122 @@ Lexical category, constructors given in mkRCl RP -> VP -> RCl -
    woman who always sleeps
    +
    woman who always sleeps
    mkRCl RP -> V -> RCl -
    woman who sleeps
    +
    woman who sleeps
    mkRCl RP -> V2 -> NP -> RCl -
    woman who loves him
    +
    woman who loves him
    mkRCl RP -> V3 -> NP -> NP -> RCl -
    woman who sends it to him
    +
    woman who sends it to him
    mkRCl RP -> VV -> VP -> RCl -
    woman who wants to sleep
    +
    woman who wants to sleep
    mkRCl RP -> VS -> S -> RCl -
    woman who says that I sleep
    +
    woman who says that I sleep
    mkRCl RP -> VQ -> QS -> RCl -
    woman who wonders who sleeps
    +
    woman who wonders who sleeps
    mkRCl RP -> VA -> A -> RCl -
    woman who becomes old
    +
    woman who becomes old
    mkRCl RP -> VA -> AP -> RCl -
    woman who becomes very old
    +
    woman who becomes very old
    mkRCl RP -> V2A -> NP -> A -> RCl -
    woman who paints it red
    +
    woman who paints it red
    mkRCl RP -> V2A -> NP -> AP -> RCl -
    woman who paints it very red
    +
    woman who paints it very red
    mkRCl RP -> V2S -> NP -> S -> RCl -
    woman who answers to him that we sleep
    +
    woman who answers to him that we sleep
    mkRCl RP -> V2Q -> NP -> QS -> RCl -
    woman who asks him who sleeps
    +
    woman who asks him who sleeps
    mkRCl RP -> V2V -> NP -> VP -> RCl -
    woman who begs him to sleep
    +
    woman who begs him to sleep
    mkRCl RP -> A -> RCl -
    woman who is old
    +
    woman who is old
    mkRCl RP -> A -> NP -> RCl -
    woman who is older than he
    +
    woman who is older than he
    mkRCl RP -> A2 -> NP -> RCl -
    woman who is married to him
    +
    woman who is married to him
    mkRCl RP -> AP -> RCl -
    woman who is very old
    +
    woman who is very old
    mkRCl RP -> NP -> RCl -
    woman who is the woman
    +
    woman who is the woman
    mkRCl RP -> N -> RCl -
    student who is a woman
    +
    student who is a woman
    mkRCl RP -> CN -> RCl -
    student who is an old woman
    +
    student who is an old woman
    mkRCl RP -> Adv -> RCl -
    woman who is here
    +
    woman who is here
    mkRCl RP -> NP -> V2 -> RCl -
    woman whom we love
    +
    woman whom we love
    mkRCl RP -> ClSlash -> RCl -
    woman whom she loves today
    +
    woman whom she loves today
    mkRCl @@ -2905,7 +2905,7 @@ Lexical category, constructors given in mkRP Prep -> NP -> RP -> RP -
    all the cities in whom
    +
    all the cities in whom
    which_RP @@ -2926,7 +2926,7 @@ Lexical category, constructors given in mkRS (Tense) -> (Ant) -> (Pol) -> RCl -> RS -
    woman who wouldn't have slept
    +
    woman who wouldn't have slept
    mkRS @@ -2936,7 +2936,7 @@ Lexical category, constructors given in mkRS Conj -> RS -> RS -> RS -
    woman who sleeps or whom we love
    +
    woman who sleeps or whom we love
    mkRS @@ -2957,7 +2957,7 @@ Lexical category, constructors given in mkS (Tense) -> (Ant) -> (Pol) -> Cl -> S -
    she wouldn't have slept
    +
    she wouldn't have slept
    mkS @@ -2967,17 +2967,17 @@ Lexical category, constructors given in mkS Conj -> S -> S -> S -
    she sleeps and I run
    +
    she sleeps and I run
    mkS Conj -> ListS -> S -
    she sleeps , I run and you walk
    +
    she sleeps , I run and you walk
    mkS Adv -> S -> S -
    today she sleeps
    +
    today she sleeps
    @@ -2993,17 +2993,17 @@ Lexical category, constructors given in mkSC S -> SC -
    that she sleeps
    +
    that she sleeps
    mkSC QS -> SC -
    who sleeps
    +
    who sleeps
    mkSC VP -> SC -
    to sleep
    +
    to sleep
    @@ -3019,7 +3019,7 @@ Lexical category, constructors given in mkSSlash Temp -> Pol -> ClSlash -> SSlash -
    she hadn't seen
    +
    she hadn't seen
    @@ -3040,7 +3040,7 @@ Lexical category, constructors given in mkSub100 Unit -> Unit -> Sub100 -
    eighty - three
    +
    eighty - three
    tenfoldSub100 @@ -3061,17 +3061,17 @@ Lexical category, constructors given in mkSub1000 Sub100 -> Sub1000 -
    ninety - nine
    +
    ninety - nine
    mkSub1000 Unit -> Sub1000 -
    nine hundred
    +
    nine hundred
    mkSub1000 Unit -> Sub100 -> Sub1000 -
    nine hundred and ninety - nine
    +
    nine hundred and ninety - nine
    @@ -3087,27 +3087,27 @@ Lexical category, constructors given in although_Subj Subj -
    although she sleeps
    +
    although she sleeps
    because_Subj Subj -
    because she sleeps
    +
    because she sleeps
    if_Subj Subj -
    if she sleeps
    +
    if she sleeps
    that_Subj Subj -
    that she sleeps
    +
    that she sleeps
    when_Subj Subj -
    when she sleeps
    +
    when she sleeps
    @@ -3139,22 +3139,22 @@ Lexical category, constructors given in conditionalTense Tense -
    she would sleep
    +
    she would sleep
    futureTense Tense -
    she will sleep
    +
    she will sleep
    pastTense Tense -
    she slept
    +
    she slept
    presentTense Tense -
    she sleeps
    +
    she sleeps
    @@ -3175,7 +3175,7 @@ Lexical category, constructors given in mkText Phr -> (Punct) -> (Text) -> Text -
    does she sleep ? yes .
    +
    does she sleep ? yes .
    mkText @@ -3185,27 +3185,27 @@ Lexical category, constructors given in mkText S -> Text -
    she slept .
    +
    she slept .
    mkText Cl -> Text -
    she sleeps .
    +
    she sleeps .
    mkText QS -> Text -
    did she sleep ?
    +
    did she sleep ?
    mkText (Pol) -> Imp -> Text -
    don't sleep !
    +
    don't sleep !
    mkText Text -> Text -> Text -
    where ? here . when ? now !
    +
    where ? here . when ? now !
    @@ -3277,32 +3277,32 @@ Lexical category, constructors given in lets_Utt VP -> Utt -
    let's sleep
    +
    let's sleep
    mkUtt S -> Utt -
    she slept
    +
    she slept
    mkUtt Cl -> Utt -
    she sleeps
    +
    she sleeps
    mkUtt QS -> Utt -
    who didn't sleep
    +
    who didn't sleep
    mkUtt QCl -> Utt -
    who sleeps
    +
    who sleeps
    mkUtt (ImpForm) -> (Pol) -> Imp -> Utt -
    don't be men
    +
    don't be men
    mkUtt @@ -3317,7 +3317,7 @@ Lexical category, constructors given in mkUtt NP -> Utt -
    this man
    +
    this man
    mkUtt @@ -3327,7 +3327,7 @@ Lexical category, constructors given in mkUtt VP -> Utt -
    to sleep
    +
    to sleep
    mkUtt @@ -3376,7 +3376,7 @@ Lexical category, constructors given in have_V2 V2 -
    to have it
    +
    to have it
    @@ -3465,57 +3465,57 @@ Lexical category, constructors given in mkVP V -> VP -
    to sleep
    +
    to sleep
    mkVP V2 -> NP -> VP -
    to love him
    +
    to love him
    mkVP V3 -> NP -> NP -> VP -
    to send it to him
    +
    to send it to him
    mkVP VV -> VP -> VP -
    to want to sleep
    +
    to want to sleep
    mkVP VS -> S -> VP -
    to know that she sleeps
    +
    to know that she sleeps
    mkVP VQ -> QS -> VP -
    to wonder who sleeps
    +
    to wonder who sleeps
    mkVP VA -> AP -> VP -
    to become red
    +
    to become red
    mkVP V2A -> NP -> AP -> VP -
    to paint it red
    +
    to paint it red
    mkVP V2S -> NP -> S -> VP -
    to answer to him that she sleeps
    +
    to answer to him that she sleeps
    mkVP V2Q -> NP -> QS -> VP -
    to ask him who sleeps
    +
    to ask him who sleeps
    mkVP V2V -> NP -> VP -> VP -
    to beg him to sleep
    +
    to beg him to sleep
    mkVP @@ -3525,57 +3525,57 @@ Lexical category, constructors given in mkVP A -> NP -> VP -
    to be older than he
    +
    to be older than he
    mkVP A2 -> NP -> VP -
    to be married to him
    +
    to be married to him
    mkVP AP -> VP -
    to be very old
    +
    to be very old
    mkVP N -> VP -
    to be a woman
    +
    to be a woman
    mkVP CN -> VP -
    to be an old woman
    +
    to be an old woman
    mkVP NP -> VP -
    to be the woman
    +
    to be the woman
    mkVP Adv -> VP -
    to be here
    +
    to be here
    mkVP VP -> Adv -> VP -
    to sleep here
    +
    to sleep here
    mkVP AdV -> VP -> VP -
    always to sleep
    +
    always to sleep
    mkVP VPSlash -> NP -> VP -
    to paint it black
    +
    to paint it black
    mkVP VPSlash -> VP -
    to paint itself black
    +
    to paint itself black
    mkVP @@ -3585,22 +3585,22 @@ Lexical category, constructors given in passiveVP V2 -> VP -
    to be loved
    +
    to be loved
    passiveVP V2 -> NP -> VP -
    to be loved by her
    +
    to be loved by her
    progressiveVP VP -> VP -
    to be sleeping
    +
    to be sleeping
    reflexiveVP V2 -> VP -
    to love itself
    +
    to love itself
    reflexiveVP @@ -3621,42 +3621,42 @@ Lexical category, constructors given in mkVPSlash V2 -> VPSlash -
    whom does she see
    +
    whom does she see
    mkVPSlash V3 -> NP -> VPSlash -
    to whom does she send it
    +
    to whom does she send it
    mkVPSlash V2A -> AP -> VPSlash -
    whom does she paint red
    +
    whom does she paint red
    mkVPSlash V2Q -> QS -> VPSlash -
    whom does she ask where I sleep
    +
    whom does she ask where I sleep
    mkVPSlash V2S -> S -> VPSlash -
    to whom does she answer that I sleep
    +
    to whom does she answer that I sleep
    mkVPSlash V2V -> VP -> VPSlash -
    whom does she beg to sleep
    +
    whom does she beg to sleep
    mkVPSlash VV -> VPSlash -> VPSlash -
    whom does she want to see
    +
    whom does she want to see
    mkVPSlash V2V -> NP -> VPSlash -> VPSlash -
    whom does she beg me to see
    +
    whom does she beg me to see
    @@ -3688,12 +3688,12 @@ Lexical category, constructors given in can8know_VV VV -
    to be able to sleep
    +
    to be able to sleep
    can_VV VV -
    to be able to sleep
    +
    to be able to sleep
    must_VV @@ -3719,7 +3719,7 @@ Lexical category, constructors given in mkVoc NP -> Voc -
    yes , my friend
    +
    yes , my friend
    please_Voc diff --git a/lib/src/mini/MiniGrammarEng.gf b/lib/src/mini/MiniGrammarEng.gf index 355e39ba8..8280dbcca 100644 --- a/lib/src/mini/MiniGrammarEng.gf +++ b/lib/src/mini/MiniGrammarEng.gf @@ -1,4 +1,4 @@ ---# -path=.:full:alltenses +--# -path=.:alltenses concrete MiniGrammarEng of MiniGrammar = LexiconEng, GrammarEng [ diff --git a/lib/src/thai/LexiconTha.gf b/lib/src/thai/LexiconTha.gf index dc25522f9..b14a46798 100644 --- a/lib/src/thai/LexiconTha.gf +++ b/lib/src/thai/LexiconTha.gf @@ -239,7 +239,7 @@ lin read_V2 = mkV2 "อ่าน" ; red_A = mkA (thword "สี" "แดง") ; religion_N = mkN (thword "ศาส" "นา") ; ----? - restaurant_N = placeN (thword "ร้าน" "อาหาร") ; + restaurant_N = placeN (thword "ร้าน" "อา" "หาร") ; right_Ord = ss "ขวา" ; river_N = mkN (thword "แม่" "น้ำ") ; road_N = mkN (thword "ถนน") ; diff --git a/lib/src/thai/QuestionTha.gf b/lib/src/thai/QuestionTha.gf index dcccd6b04..fd4f64f9d 100644 --- a/lib/src/thai/QuestionTha.gf +++ b/lib/src/thai/QuestionTha.gf @@ -17,7 +17,7 @@ concrete QuestionTha of Question = CatTha ** QuestIAdv iadv cl = {s = \\p => thbind (cl.s ! ClDecl ! p) iadv.s} ; - QuestIComp icomp np = {s = \\p => thbind np.s icomp.s} ; + QuestIComp icomp np = {s = \\p => thbind np.s (polStr may_s p) icomp.s} ; PrepIP p ip = thbind p ip ; @@ -37,9 +37,9 @@ concrete QuestionTha of Question = CatTha ** AdvIAdv i a = thbind i a ; - CompIAdv a = a ; + CompIAdv a = ss (thbind yuu_s a.s) ; - CompIP ip = ip ; + CompIP ip = ss (thbind pen_s ip.s) ; } diff --git a/lib/src/thai/StringsTha.gf b/lib/src/thai/StringsTha.gf index 2f11cde1d..5244b2657 100644 --- a/lib/src/thai/StringsTha.gf +++ b/lib/src/thai/StringsTha.gf @@ -94,6 +94,6 @@ yay_s = "ใหญ" ; -- big yig_s = "หญิง" ; -- woman2 yii_s = "ยี่" ; -- two' yin_s = "ยิน" ; -- you're-welcome1 -yuu_s = "ยู" ; -- where0(?) +yuu_s = "อยู่" ; -- be (in a place) } diff --git a/lib/src/thai/ThaiScript.hs b/lib/src/thai/ThaiScript.hs index d1cb62bc5..93f0530c5 100644 --- a/lib/src/thai/ThaiScript.hs +++ b/lib/src/thai/ThaiScript.hs @@ -13,6 +13,7 @@ allThpron = do System.system "ls *Tha*.gf ../api/*Tha*.gf >srcThai.txt" files <- readFile "srcThai.txt" >>= return . lines mapM_ fileThpron files + return () fileThpron file = do s <- readFile file diff --git a/lib/src/thai/VerbTha.gf b/lib/src/thai/VerbTha.gf index b5c582bfc..c2559f772 100644 --- a/lib/src/thai/VerbTha.gf +++ b/lib/src/thai/VerbTha.gf @@ -73,7 +73,7 @@ concrete VerbTha of Verb = CatTha ** open ResTha, StringsTha, Prelude in { } } ; - CompAdv a = {s = \\p => polStr may_s p ++ a.s} ; --- ?? + CompAdv a = {s = \\p => thbind (polStr may_s p) yuu_s a.s} ; --- works for place adverbs }