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-03 Thread Vishnu Priya


  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?


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.


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

2017-03-03 Thread Vishnu Priya
Associative Link seems to solve my probleam. Let me try like this and get 
back to you.

On Wednesday, 1 March 2017 22:23:47 UTC+1, Roman Treutlein wrote:
>
> Well first of all, using a HebbianLink doesn't make sense you want a 
> AssociativeLink.
>
> And then it should kinda look like this:
>
> (AssociativeLink (stv 0.9 0.9)
> (InheritanceLink (stv 0.9 0.9)
> (ConceptNode "Einstein")
> (ConceptNode "violin-players")
> )
> (NumberNode "8787")
> )
>
>
>
> On Tuesday, February 28, 2017 at 9:18:46 PM UTC+1, Vishnu Priya wrote:
>>
>>
>>
>> i tried FC using the knowledge which has NumberNodes that are associated 
>> with the ConceptNodes through HebbianLink. I applied deduction rule and got 
>> an empty SetLink.
>>
>> Knowledge:
>>
>> (ConceptNode "Socrates" (stv .001 0.9))
>> (ConceptNode "Einstein" (stv .001 0.9))
>> (ConceptNode "Peirce" (stv .001 0.9))
>> (ConceptNode "man" (stv .01 0.9))
>> (ConceptNode "human" (stv .02 0.9))
>>
>>
>> (InheritanceLink (stv 0.9 0.9)
>> (ConceptNode "Socrates")
>> (ConceptNode "man"))
>>
>> (HebbianLink (stv 0.9 0.9)
>> (ConceptNode "Socrates")
>> (ConceptNode "man")
>> (NumberNode "8787"))
>>
>> (InheritanceLink (stv 0.9 0.9)
>> (ConceptNode "Einstein")
>> (ConceptNode "man"))
>>
>> (HebbianLink (stv 0.9 0.9)
>> (ConceptNode "Einstein")
>> (ConceptNode "man")
>> (NumberNode "8787"))
>>
>> (InheritanceLink (stv 0.9 0.9)
>> (ConceptNode "Peirce")
>> (ConceptNode "man"))
>>
>> (HebbianLink (stv 0.9 0.9)
>> (ConceptNode "Peirce")
>> (ConceptNode "man")
>> (NumberNode "8787"))
>>
>> (InheritanceLink (stv 0.9 0.9)
>> (ConceptNode "man")
>> (ConceptNode "human"))
>>
>> (HebbianLink (stv 0.9 0.9)
>> (ConceptNode "man")
>> (ConceptNode "human")
>> (NumberNode "8787"))
>>
>> (InheritanceLink (stv 0.9 0.9)
>> (ConceptNode "Einstein")
>> (ConceptNode "violin-players"))
>>
>> (HebbianLink (stv 0.9 0.9)
>> (ConceptNode "Einstein")
>> (ConceptNode "violin-players")
>> (NumberNode "8787"))
>>
>>
>> (define source
>> (InheritanceLink
>> (ConceptNode "Einstein")
>> (ConceptNode "man")
>> (NumberNode "8787")
>> )
>> )
>>
>>
>> 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/b0e56a13-c8cc-4655-a405-a481eff51365%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-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.


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

2017-03-01 Thread Roman Treutlein
Well first of all, using a HebbianLink doesn't make sense you want a 
AssociativeLink.

And then it should kinda look like this:

(AssociativeLink (stv 0.9 0.9)
(InheritanceLink (stv 0.9 0.9)
(ConceptNode "Einstein")
(ConceptNode "violin-players")
)
(NumberNode "8787")
)



On Tuesday, February 28, 2017 at 9:18:46 PM UTC+1, Vishnu Priya wrote:
>
>
>
> i tried FC using the knowledge which has NumberNodes that are associated 
> with the ConceptNodes through HebbianLink. I applied deduction rule and got 
> an empty SetLink.
>
> Knowledge:
>
> (ConceptNode "Socrates" (stv .001 0.9))
> (ConceptNode "Einstein" (stv .001 0.9))
> (ConceptNode "Peirce" (stv .001 0.9))
> (ConceptNode "man" (stv .01 0.9))
> (ConceptNode "human" (stv .02 0.9))
>
>
> (InheritanceLink (stv 0.9 0.9)
> (ConceptNode "Socrates")
> (ConceptNode "man"))
>
> (HebbianLink (stv 0.9 0.9)
> (ConceptNode "Socrates")
> (ConceptNode "man")
> (NumberNode "8787"))
>
> (InheritanceLink (stv 0.9 0.9)
> (ConceptNode "Einstein")
> (ConceptNode "man"))
>
> (HebbianLink (stv 0.9 0.9)
> (ConceptNode "Einstein")
> (ConceptNode "man")
> (NumberNode "8787"))
>
> (InheritanceLink (stv 0.9 0.9)
> (ConceptNode "Peirce")
> (ConceptNode "man"))
>
> (HebbianLink (stv 0.9 0.9)
> (ConceptNode "Peirce")
> (ConceptNode "man")
> (NumberNode "8787"))
>
> (InheritanceLink (stv 0.9 0.9)
> (ConceptNode "man")
> (ConceptNode "human"))
>
> (HebbianLink (stv 0.9 0.9)
> (ConceptNode "man")
> (ConceptNode "human")
> (NumberNode "8787"))
>
> (InheritanceLink (stv 0.9 0.9)
> (ConceptNode "Einstein")
> (ConceptNode "violin-players"))
>
> (HebbianLink (stv 0.9 0.9)
> (ConceptNode "Einstein")
> (ConceptNode "violin-players")
> (NumberNode "8787"))
>
>
> (define source
> (InheritanceLink
> (ConceptNode "Einstein")
> (ConceptNode "man")
> (NumberNode "8787")
> )
> )
>
>
> 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/1a516a84-cd5d-4788-a496-bbe39a693c09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2017-02-28 Thread Vishnu Priya


i tried FC using the knowledge which has NumberNodes that are associated 
with the ConceptNodes through HebbianLink. I applied deduction rule and got 
an empty SetLink.

Knowledge:

(ConceptNode "Socrates" (stv .001 0.9))
(ConceptNode "Einstein" (stv .001 0.9))
(ConceptNode "Peirce" (stv .001 0.9))
(ConceptNode "man" (stv .01 0.9))
(ConceptNode "human" (stv .02 0.9))


(InheritanceLink (stv 0.9 0.9)
(ConceptNode "Socrates")
(ConceptNode "man"))

(HebbianLink (stv 0.9 0.9)
(ConceptNode "Socrates")
(ConceptNode "man")
(NumberNode "8787"))

(InheritanceLink (stv 0.9 0.9)
(ConceptNode "Einstein")
(ConceptNode "man"))

(HebbianLink (stv 0.9 0.9)
(ConceptNode "Einstein")
(ConceptNode "man")
(NumberNode "8787"))

(InheritanceLink (stv 0.9 0.9)
(ConceptNode "Peirce")
(ConceptNode "man"))

(HebbianLink (stv 0.9 0.9)
(ConceptNode "Peirce")
(ConceptNode "man")
(NumberNode "8787"))

(InheritanceLink (stv 0.9 0.9)
(ConceptNode "man")
(ConceptNode "human"))

(HebbianLink (stv 0.9 0.9)
(ConceptNode "man")
(ConceptNode "human")
(NumberNode "8787"))

(InheritanceLink (stv 0.9 0.9)
(ConceptNode "Einstein")
(ConceptNode "violin-players"))

(HebbianLink (stv 0.9 0.9)
(ConceptNode "Einstein")
(ConceptNode "violin-players")
(NumberNode "8787"))


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


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.


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

2017-02-27 Thread Vishnu Priya

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/0a65bf7a-225b-4b00-8b89-f85b5e0a1f73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2017-02-27 Thread Roman Treutlein
When the work on protoAtoms and Valuations is done you could use those to 
cleanly implement what you want.
Currently, I would write the id in a ConceptNode or NumberNode and 
associate it with the sentence using an AssociativeLink.
You would likely have to write some custom code to do that.

On Monday, February 27, 2017 at 11:29:15 AM UTC+1, Vishnu Priya wrote:
>
> Hello all,
>
> I have a knowledge base, in which each sentence is implicitly associated 
> with an ID which is of the type long int. 
> As far as i know, we can parse only the straight sentences through NLP 
> pipeline. But i want to process the sentences along with their Ids.  is it 
> possible to do so?
>
> Oranges are sweet - Input
> 78783322 - ID
>
> Oranges are sweet has 78783322 / Oranges are sweet belongs to 
> 78783322
> How about passing above such sentences through NLP ?
> Is there any other way around?
>
> Whatever i do (Forward/backward Chaining,  stimulating etc...),  i should 
> be to able to know which atoms are of which ID. 
>
> How can i adapt opencog ? Should i write some code on top of it? or is it 
> totally un-doable?
>
>
> 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/e5c4a273-e724-486c-91d2-5ce6e24b7603%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.