Download Manual pages Treebank Semantics Parsed Corpus (TSPC) More Tools

Welcome to

Treebank Semantics —
Meaning Representations from Treebanks

What is Treebank Semantics?

Treebank Semantics is an implemented system that automatically derives meaning representations of quality from treebank annotations. The central component is a system of evaluation for a small formal language with respect to a structured information state. Inputs to the system are expressions of the formal language obtained from the conversion of parsed treebank data. Outputs by default are Davidsonian meaning representations.

The system is distributed freely.

Having a system of formal evaluation as the basis for generating meaning representations makes possible accepting input with minimal conversion from existing treebanks. To see ready made examples, web based interfaces are provided to the following parsed corpora:

These parsed corpora provide a testing ground for the system, with meaning representations built automatically by the system from treebank files.

Book

A book describing the approach and implementation is published by Springer-Verlag.

Acknowledgements

Development is funded by the Japan Science and Technology Agency (JST) and the Japan Society for the Promotion of Science (JSPS).

Feedback

Feedback is extremely welcome. Please email: ajb129 __AT__ hotmail __DOT__ com.



Manual pages

    run_ts(1)create meaning representation
    see_ts(1)create SCT expression


run_ts(1)run_ts(1)

NAME

run_ts - create meaning representation

SYNOPSIS

run_ts [OPTIONS]

DESCRIPTION

Reads SCT representation from stdin, returns meaning representation to stdout.

OPTIONS

#
# influence what is present with the output
#
--untrans)output untransformed representation
--free)keep free variables
#
# influence compiler choice (default compiler is PolyML without precompiling)
#
--poly)use PolyML as Standard ML compiler with precompiling
--mosml)use MOSML as Standard ML compiler
--smlnj)use SML/NJ as Standard ML compiler
--mlkit)use MLKit as Standard ML compiler
--mlton)profile with MLTON as Standard ML compiler
#
# help and examples
#
--example)show examples
--keep)keep generated intermediate files
*)show this message

EXAMPLES

$ cat << EOF | run_ts | lang_pretty
> val sent_i =
> ( fn fh =>
>   ( fn lc =>
>     ( ( fn lc =>
>         ( some lc fh ".e"
>           ( gen "ENTITY")
>           ( nn lc "cat")))
>       [ "ARG0", "h"] "ARG0"
>       ( verb lc ".event" ["ARG0"] "enters"
>         ( gen "EVENT"))))
>   [ "ARG0"])
> [ ".e", ".event"]
> ;
> 
> val sent_ii =
> ( fn fh =>
>   ( fn lc =>
>     ( ( fn lc =>
>         ( pro ["*"]
>           [ "ENTITY"] ".e" "it"
>           ( gen "ENTITY")))
>       [ "ARG0"] "ARG0"
>       ( verb lc ".event" ["ARG0"] "purrs"
>         ( gen "EVENT"))))
>   [ "ARG0"])
> [ ".e", ".event"]
> ;
> 
> val sent_iii =
> ( fn fh =>
>   ( fn lc =>
>     ( subord lc nil
>       ( ( fn lc =>
>           ( ( fn lc =>
>               ( pro ["*"]
>                 [ "ENTITY"] ".e" "it"
>                 ( gen "ENTITY")))
>             [ "ARG0"] "ARG0"
>             ( verb lc ".event" ["ARG0"] "departs"
>               ( gen "EVENT"))))
>         [ "ARG0"])))
>   [])
> [ ".e", ".event"]
> ;
> 
> val _ = translate [".e", ".event"] "TEST" ((fn fh => (conj fh "∧" free [sent_i, sent_ii, sent_iii])) [".e", ".event"]);
> 
> EOF
-| <tsxml>
-|   <top id="TEST">
-|     <quant name="∃">
-|       <bound>
-|         <term sort="ENTITY" id="5" />
-|         <term sort="ENTITY" id="3" />
-|         <term sort="EVENT" id="2" />
-|         <term sort="EVENT" id="4" />
-|         <term sort="EVENT" id="6" />
-|         <term sort="ENTITY" id="1" />
-|       </bound>
-|       <conj name="∧">
-|         <predicate name="cat">
-|           <at role="h">
-|             <term sort="ENTITY" id="1" />
-|           </at>
-|         </predicate>
-|         <test name="=">
-|           <term sort="ENTITY" id="3" />
-|           <term select="it:pick1">
-|             <term sort="ENTITY" id="1" />
-|           </term>
-|         </test>
-|         <test name="=">
-|           <term sort="ENTITY" id="5" />
-|           <term select="it:pick1">
-|             <term sort="ENTITY" id="1" />
-|           </term>
-|         </test>
-|         <predicate name="enters">
-|           <at role="ARG0">
-|             <term sort="ENTITY" id="1" />
-|           </at>
-|           <at role="EVENT">
-|             <term sort="EVENT" id="2" />
-|           </at>
-|         </predicate>
-|         <predicate name="purrs">
-|           <at role="ARG0">
-|             <term sort="ENTITY" id="3" />
-|           </at>
-|           <at role="EVENT">
-|             <term sort="EVENT" id="4" />
-|           </at>
-|         </predicate>
-|         <predicate name="departs">
-|           <at role="ARG0">
-|             <term sort="ENTITY" id="5" />
-|           </at>
-|           <at role="EVENT">
-|             <term sort="EVENT" id="6" />
-|           </at>
-|         </predicate>
-|       </conj>
-|     </quant>
-|   </top>
-| </tsxml>
cat << EOF | run_ts | lang_pretty
> val sent =
> ( fn fh =>
>   ( fn lc =>
>     ( ( fn lc =>
>         ( quant lc fh "EVERY" ".e"
>           ( gen "ENTITY")
>           ( nn lc "wife")))
>       [ "ARG0", "h"] "ARG0"
>       ( embVerb lc ".event" ["ARG0"] "thinks"
>         ( gen "EVENT")
>         ( At
>           ( subord lc nil
>             ( ( fn lc =>
>                 ( ( fn lc =>
>                     ( focusParticle fh "ONLY" ".e"
>                       ( gen "ENTITY")
>                       ( pro ["*"]
>                         [ "ENTITY"] ".e" "she"
>                         ( gen "ENTITY"))))
>                   [ "ARG0", "ARG1"] "ARG0"
>                   ( ( fn lc =>
>                       ( some lc fh ".e"
>                         ( gen "ENTITY")
>                         ( ( fn lc =>
>                             ( pro ["*"]
>                               [ "ENTITY"] ".e" "her"
>                               ( gen "ENTITY")))
>                           [ "POS", "h"] "POS"
>                           ( nn lc "husband"))))
>                     [ "ARG0", "ARG1", "POS", "h"] "ARG1"
>                     ( verb lc ".event" ["ARG1", "ARG0"] "respects"
>                       ( gen "EVENT")))))
>               [ "ARG0", "ARG1"]),
>             "THT")))))
>   [ "ARG0"])
> [ ".e", ".event"]
> ;
> 
> val _ = translate [".e", ".event"] "70_misc_BUFFALO" sent;
> 
EOF
-| <tsxml>
-|   <top id="70_misc_BUFFALO">
-|     <quant name="EVERY">
-|       <bound>
-|         <term sort="ENTITY" id="1" />
-|       </bound>
-|       <connective>
-|         <predicate name="wife">
-|           <at role="h">
-|             <term sort="ENTITY" id="1" />
-|           </at>
-|         </predicate>
-|         <quant name="∃">
-|           <bound>
-|             <term sort="ENTITY" id="6" />
-|             <term sort="ENTITY" id="4" />
-|             <term sort="EVENT" id="7" />
-|             <term sort="EVENT" id="2" />
-|             <term sort="ENTITY" id="5" />
-|           </bound>
-|           <conj name="∧">
-|             <test name="=">
-|               <term sort="ENTITY" id="4" />
-|               <term select="she:pick1">
-|                 <term sort="ENTITY" id="1" />
-|               </term>
-|             </test>
-|             <test name="=">
-|               <term sort="ENTITY" id="6" />
-|               <term select="her:pick2">
-|                 <term sort="ENTITY" id="4" />
-|                 <term sort="ENTITY" id="1" />
-|               </term>
-|             </test>
-|             <predicate name="husband">
-|               <at role="h">
-|                 <term sort="ENTITY" id="5" />
-|               </at>
-|               <at role="POS">
-|                 <term sort="ENTITY" id="6" />
-|               </at>
-|             </predicate>
-|             <predicate name="thinks">
-|               <at role="ARG0">
-|                 <term sort="ENTITY" id="1" />
-|               </at>
-|               <at role="EVENT">
-|                 <term sort="EVENT" id="2" />
-|               </at>
-|               <at role="THT">
-|                 <connective>
-|                   <predicate name="ONLY">
-|                     <term sort="ENTITY" id="4" />
-|                   </predicate>
-|                   <predicate name="respects">
-|                     <at role="ARG1">
-|                       <term sort="ENTITY" id="5" />
-|                     </at>
-|                     <at role="ARG0">
-|                       <term sort="ENTITY" id="4" />
-|                     </at>
-|                     <at role="EVENT">
-|                       <term sort="EVENT" id="7" />
-|                     </at>
-|                   </predicate>
-|                 </connective>
-|               </at>
-|             </predicate>
-|           </conj>
-|         </quant>
-|       </connective>
-|     </quant>
-|   </top>
-| </tsxml>


see_ts(1)see_ts(1)

NAME

see_ts - create SCT expression

SYNOPSIS

see_ts [OPTIONS]

DESCRIPTION

Reads syntactic parse from stdin, returns SCT expression to stdout.

All tree content should be on the same line. Discourse is captured when all discourse content is on a single line.

OPTIONS

nuke|--nuke)remove generated output* files
--warning|-w)return SCT expression with warnings of unprocessed materials
--debug|-d)observe how SCT expression is reached
--free)remove quantification layers
--reset)reset numbering with each sentence/discourse
--example)show examples
*)show this message

EXAMPLES

$ cat << EOF | see_ts
> ( (IP-MAT (PP (P-ROLE ARG0) (NP (D A) (N cat))) (VB enters) (PU __dot__)) (ID TEST;EN))( (IP-MAT (PP (P-ROLE ARG0) (NP (PRO It))) (VB purrs) (PU __dot__)) (ID TEST;EN))( (IP-SUB (PP (P-ROLE ARG0) (NP (PRO It))) (VB departs) (PU __dot__)) (ID TEST;EN))
> EOF
-| val sent_i =
-| ( fn fh =>
-|   ( fn lc =>
-|     ( ( fn lc =>
-|         ( some lc fh ".e"
-|           ( gen "ENTITY")
-|           ( nn lc "cat")))
-|       [ "ARG0", "h"] "ARG0"
-|       ( verb lc ".event" ["ARG0"] "enters"
-|         ( gen "EVENT"))))
-|   [ "ARG0"])
-| [ ".e", ".event"]
-| ;
-| 
-| val sent_ii =
-| ( fn fh =>
-|   ( fn lc =>
-|     ( ( fn lc =>
-|         ( pro ["*"]
-|           [ "ENTITY"] ".e" "it"
-|           ( gen "ENTITY")))
-|       [ "ARG0"] "ARG0"
-|       ( verb lc ".event" ["ARG0"] "purrs"
-|         ( gen "EVENT"))))
-|   [ "ARG0"])
-| [ ".e", ".event"]
-| ;
-| 
-| val sent_iii =
-| ( fn fh =>
-|   ( fn lc =>
-|     ( subord lc nil
-|       ( ( fn lc =>
-|           ( ( fn lc =>
-|               ( pro ["*"]
-|                 [ "ENTITY"] ".e" "it"
-|                 ( gen "ENTITY")))
-|             [ "ARG0"] "ARG0"
-|             ( verb lc ".event" ["ARG0"] "departs"
-|               ( gen "EVENT"))))
-|         [ "ARG0"])))
-|   [])
-| [ ".e", ".event"]
-| ;
-| 
-| val _ = translate [".e", ".event"] "TEST" ((fn fh => (conj fh "∧" free [sent_i, sent_ii, sent_iii])) [".e", ".event"]);
-| 
cat << EOF | see_ts
> ( (IP-MAT (PP (P-ROLE ARG0) (NP (ACT __star__INDEF__star__) (Q Every) (N wife))) (VB thinks) (CP-THT (IP-SUB (PP (P-ROLE ARG0) (NP (ADV only) (PRO she))) (VB respects) (PP (P-ROLE ARG1) (NP (PP (P-ROLE POS) (NP (PRO her))) (N husband))))) (PU __dot__)) (ID 70_misc_BUFFALO;EN))
EOF
-| val sent =
-| ( fn fh =>
-|   ( fn lc =>
-|     ( ( fn lc =>
-|         ( quant lc fh "EVERY" ".e"
-|           ( gen "ENTITY")
-|           ( nn lc "wife")))
-|       [ "ARG0", "h"] "ARG0"
-|       ( embVerb lc ".event" ["ARG0"] "thinks"
-|         ( gen "EVENT")
-|         ( At
-|           ( subord lc nil
-|             ( ( fn lc =>
-|                 ( ( fn lc =>
-|                     ( focusParticle fh "ONLY" ".e"
-|                       ( gen "ENTITY")
-|                       ( pro ["*"]
-|                         [ "ENTITY"] ".e" "she"
-|                         ( gen "ENTITY"))))
-|                   [ "ARG0", "ARG1"] "ARG0"
-|                   ( ( fn lc =>
-|                       ( some lc fh ".e"
-|                         ( gen "ENTITY")
-|                         ( ( fn lc =>
-|                             ( pro ["*"]
-|                               [ "ENTITY"] ".e" "her"
-|                               ( gen "ENTITY")))
-|                           [ "POS", "h"] "POS"
-|                           ( nn lc "husband"))))
-|                     [ "ARG0", "ARG1", "POS", "h"] "ARG1"
-|                     ( verb lc ".event" ["ARG1", "ARG0"] "respects"
-|                       ( gen "EVENT")))))
-|               [ "ARG0", "ARG1"]),
-|             "THT")))))
-|   [ "ARG0"])
-| [ ".e", ".event"]
-| ;
-| 
-| val _ = translate [".e", ".event"] "70_misc_BUFFALO" sent;
-| 


Last updated: October 26, 2017