Re: [opencog-dev] Re: How to handle input data that has an ID?

2017-03-14 Thread Linas Vepstas
There are many ways of doing this.  The simplest one is probably this:

(EvaluationLink
 (PredicateNode "Vishnu's special ID43")
 (InheritanceLink (stv 0.9 0.9)
  (ConceptNode "Einstein")
  (ConceptNode "man"

which is conceptually the same thing as

(VishnuSpecialLink
(PredicateNode "ID43")
(InheritanceLink (stv 0.9 0.9)
   (ConceptNode "Einstein")
   (ConceptNode "man"

--linas

On Tue, Mar 14, 2017 at 10:35 PM, Vishnu Priya 
wrote:

> Hi,
>
> I tried DefineLink. But the problem is i can define my ID only once. Since
> it is used to give an unique name.
>
> (DefineLink
> (DefinedSchemaNode "ID1")
> (InheritanceLink (stv 0.9 0.9)
> (ConceptNode "Einstein")
> (ConceptNode "man")))
>
> (DefineLink
> (DefinedSchemaNode "ID1")
> (ListLink
> (ConceptNode "Peirce")
> (ConceptNode "man")))
>
> I cannot do the above assigning  same IDs in two different places. It
> throws an Exception saying  ID1 is already defined.
>
> Is there exists something,  so that i can handle such situation?
>
> Thanks,
> Vishnu
>
>
>
>
>
>
>
>> --
> You received this message because you are subscribed to the Google Groups
> "opencog" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to opencog+unsubscr...@googlegroups.com.
> To post to this group, send email to opencog@googlegroups.com.
> Visit this group at https://groups.google.com/group/opencog.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/opencog/69e9f165-15f6-40e8-b8a9-5f5fde4a24a1%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to opencog+unsubscr...@googlegroups.com.
To post to this group, send email to opencog@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/CAHrUA36YAb20Zr%2Bu9SrGwqOFcH5vFfdVV1eg59XCycww%2BGuYvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [opencog-dev] Re: How to handle input data that has an ID?

2017-03-14 Thread Linas Vepstas
On Fri, Mar 3, 2017 at 10:51 PM, 'Nil Geisweiller' via opencog <
opencog@googlegroups.com> wrote:


> PLN doesn't have any rule to reason about AssociativeLinks. To have some
> we'd need to define its semantics.
>

I think they're called association links.

It might be interesting to have a demo that shows how to add new rules to
PLN ... in my imagination, I assume that perhaps biology data or something
like that might need new rules that are not a part of the default PLN.  I
have no clear idea of how or why, but it seems like it could happen.

It might also be intesting to know how to disable certain PLN rules ...

--linas

-- 
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to opencog+unsubscr...@googlegroups.com.
To post to this group, send email to opencog@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/CAHrUA37%2BDd16R0OaPe7UAddH8BBN9Q5ebVNEhpOjCFKiGdoyCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [opencog-dev] Re: How to handle input data that has an ID?

2017-03-14 Thread Vishnu Priya
Hi,

I tried DefineLink. But the problem is i can define my ID only once. Since 
it is used to give an unique name. 

(DefineLink
(DefinedSchemaNode "ID1")
(InheritanceLink (stv 0.9 0.9)
(ConceptNode "Einstein")
(ConceptNode "man")))

(DefineLink
(DefinedSchemaNode "ID1")
(ListLink
(ConceptNode "Peirce")
(ConceptNode "man")))

I cannot do the above assigning  same IDs in two different places. It 
throws an Exception saying  ID1 is already defined. 

Is there exists something,  so that i can handle such situation?

Thanks,
Vishnu







>

-- 
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to opencog+unsubscr...@googlegroups.com.
To post to this group, send email to opencog@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/69e9f165-15f6-40e8-b8a9-5f5fde4a24a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [opencog-dev] Re: How to handle input data that has an ID?

2017-03-03 Thread 'Nil Geisweiller' via opencog



On 03/03/2017 11:28 AM, Vishnu Priya wrote:



  Yeah. True!! Inheritance Link takes only two arguments.
My inputs belongs to certain ID. So somehow i want to associate my input
with ID.  It seems that, i could use AssociativeLink as Roman said. Then
probably i could do PLN reasoning. But Are there PLN rules that work for
such input?


PLN doesn't have any rule to reason about AssociativeLinks. To have some 
we'd need to define its semantics.


Maybe what you want is http://wiki.opencog.org/w/DefineLink

I haven't experimented much with these, but they are apparently well 
supported by the pattern matcher, and since the rule engine is built on 
top of the pattern matcher I assume it should work well with it.


Nil




Thanks
Vishnu


--
You received this message because you are subscribed to the Google
Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opencog+unsubscr...@googlegroups.com
.
To post to this group, send email to opencog@googlegroups.com
.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit
https://groups.google.com/d/msgid/opencog/dcf69018-27e7-4022-80bf-103fb0866a9f%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to opencog+unsubscr...@googlegroups.com.
To post to this group, send email to opencog@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/e85e7c0d-3f52-5d5d-de4e-fffb672f227c%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [opencog-dev] Re: How to handle input data that has an ID?

2017-03-02 Thread 'Nil Geisweiller' via opencog



On 02/28/2017 10:18 PM, Vishnu Priya wrote:

(define source
(InheritanceLink
(ConceptNode "Einstein")
(ConceptNode "man")
(NumberNode "8787")
)
)


This inheritance link is ill-formed, it should only take 2 arguments. We 
plane to automatically type check that sort of thing, for now you can 
refer to http://wiki.opencog.org/w/Category:Atom_Types


Or maybe you meant HebbianLink. There are no PLN rule to reason on 
hebbian links yet. This would help OpenCog to reason about attention 
allocation, possibly reasoning itself, but I suppose that is not what 
you had in mind.


Nil




Where is it wrong in including ID?


Thanks,
Vishnu



n Monday, 27 February 2017 16:29:45 UTC+1, Vishnu Priya wrote:


Thanks for the reply, Roman.

So, should it be like this

(EvaluationLink
HebbianLink
   (PredicateNode "sweet@3fe00455-333f-4cd8-a488-1d23f81c4546")
   (ListLink
  (ConceptNode "oranges@33c76dd3-d3c1-4e38-b2ba-b77abfbebadb")
  (NumberNode  7878
   )

In general, i parse and get r2l output of the sentence. Then i can
apply a custom code to get the HebbianLink and the NumberNode ?



--
You received this message because you are subscribed to the Google
Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opencog+unsubscr...@googlegroups.com
.
To post to this group, send email to opencog@googlegroups.com
.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit
https://groups.google.com/d/msgid/opencog/4ac85586-afcf-409a-9e35-4769e7313531%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to opencog+unsubscr...@googlegroups.com.
To post to this group, send email to opencog@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/ee675a53-28ee-c14c-63e7-20636c3eac37%40gmail.com.
For more options, visit https://groups.google.com/d/optout.