[opencog-dev] A question about PM with a partial list

2016-10-28 Thread Tareq Alkhaldi
Hi all, Is there a way to use the PM to match a partial list as the following? Atomspace has this: (EvaluationLink (PredicateNode "pulled@463a5d30-1733-48bc-b188-cb1fcd1d3ee0") (ListLink (ConceptNode "James@c597a7ec-60ab-429d-b003-4782200c7a91") (ConceptNode "pudding@f797

Re: [opencog-dev] A question about PM with a partial list

2016-10-28 Thread Linas Vepstas
Hi Tareq, Currently, the only way to do this is is to write two different patterns, one that searches for three words, and one that searches for two. Another possibility is to use a GlobNode instead of a VariableNode, this will accept sequences of neighboring words, as one. However, this might n

Re: [opencog-dev] A question about PM with a partial list

2016-11-07 Thread Tareq Alkhaldi
Hi Linas, Okay, I started adding the StarNode variable, but I have a question. So StarNode should work exactly like GlobNode except that it can accept a zero, right? What about something that will match zero or more but not necessarily in order? For example to match all the nodes in the pattern

Re: [opencog-dev] A question about PM with a partial list

2016-11-07 Thread Linas Vepstas
Hi Tareq, You can probably implement StarNode as a minor variation on the current GlobNode code. By the way, that code is here: https://github.com/opencog/atomspace/blob/master/opencog/query/PatternMatchEngine.cc#L227-L288 and specifically, here: https://github.com/opencog/atomspace/blob/master/o

Re: [opencog-dev] A question about PM with a partial list

2016-11-20 Thread Tareq Alkhaldi
Hi Linas, Thanks, I'll get to it once I'm done with the current phase of homeworks, reports and a big report coming up for school. You're right about what I thought, I thought I could have an orderedList (a, b, c, d.. etc), match (a, d) and throw everything else into another variable. For now