• Image

 

Image

Sequence and Declaration

02/05/2020

Newly implemented sequence reasoning example.  Runs as test/conflict_is.test.

 

# declarations:

the:Art
korean:Adj
conflict:N
was:V
a:Art
war:N

 

# standard grammar priors:

|VP <= [|Adv] |V [{|NP,|S} ]
|NP <= [|Art] [|Adj] |N [|PP]
|PP <= |Prep |NP
|S <= |NP [|Aux] |VP

 

# fact articulation:

<a>|NP {was,is} <b>|NP => <a>:<b>

 

# shove in the input:

>> the korean conflict was a war

 

# see what happened:

?_the_korean_conflict|_a_war

#YES

 

# here's the stream output:

###dumpstream

- {}
1 1-3 *** {_the_korean_conflict}
2 1-4 **** {__the_korean_conflict_was}
3 1-6 ****** {__the_korean_conflict__was__a_war}
0 1-1 * {the}
1 2-3 ** {_korean_conflict}
2 2-4 *** {__korean_conflict_was}
3 2-6 ***** {__korean_conflict__was__a_war}
0 2-2 * {korean}
1 3-4 ** {_conflict_was}
3 3-6 **** {_conflict__was__a_war}
0 3-3 * {conflict}
2 4-6 *** {_was__a_war}
0 4-4 * {was}
1 5-6 ** {_a_war}
0 5-5 * {a}
0 6-6 * {war}

 

# Here's the symbol data:

###dumpsets

// dump_sets
war:NP
war:N
a:Art
_a_war:NP
_the_korean_conflict:NP
_the_korean_conflict:_a_war
the:Art
_korean_conflict:_a_war
_korean_conflict:NP
korean:Adj
conflict:N
conflict:NP
conflict:_a_war
__the_korean_conflict_was:S
_was__a_war:VP
__the_korean_conflict__was__a_war:S
__korean_conflict__was__a_war:S
__korean_conflict_was:S
was:VP
was:V
_conflict__was__a_war:S
_conflict_was:S

 

# Here's what the rules say inside (confirmation):

###dumprules
// dump_rules
|VP<=[|Adv] |V [{|NP,|S}]
|NP<=[|Art] [|Adj] |N [|PP]
|PP<=|Prep |NP
|S<=|NP [|Aux] |VP
<a>|NP {was,is} <b>|NP=><a>:<b>

 

# Then we consider a further concept flattener

[<a>|Art] [<b>|Adj] <c>|N [<d>|PP] => {<a>,<b>,<c>,<d>}

 

# and we ask is conflict war

?conflict|war

# YES

 

# The stream is now rich with meaning:

###dumpstream
- {}
1 1-3 *** {_the_korean_conflict,conflict,korean,the}
2 1-4 **** {__the_korean_conflict_was}
3 1-6 ****** {__the_korean_conflict__was__a_war,__the_korean_conflict__was_war,_conflict__was__a_war,_conflict__was_war}
0 1-1 * {the}
1 2-3 ** {_korean_conflict,conflict,korean}
2 2-4 *** {__korean_conflict_was}
3 2-6 ***** {__korean_conflict__was__a_war}
0 2-2 * {korean}
1 3-4 ** {_conflict_was}
3 3-6 **** {_conflict__was__a_war,_conflict__was_war}
0 3-3 * {conflict}
2 4-6 *** {_was__a_war,_was_war}
0 4-4 * {was}
1 5-6 ** {_a_war,a,war}
0 5-5 * {a}
0 6-6 * {war}

 

 

# The properties then attributed as appropriate

###dumpsets
// dump_sets
_the_korean_conflict:_a_war
_the_korean_conflict:NP
_the_korean_conflict:war
_was__a_war:VP
was:VP
was:V
korean:Adj
_korean_conflict:war
_korean_conflict:NP
_korean_conflict:_a_war
conflict:_a_war
conflict:war
conflict:N
conflict:NP
_conflict__was_war:S
__korean_conflict_was:S
the:Art
__the_korean_conflict__was_war:S
_was_war:VP
__the_korean_conflict_was:S
__korean_conflict__was__a_war:S
__the_korean_conflict__was__a_war:S
_conflict_was:S
_conflict__was__a_war:S
a:Art
_a_war:NP
war:NP
war:N