How to represent object with atributes (single value and collection value)?

44 views
Skip to first unread message

Alex

unread,
Feb 11, 2017, 7:07:24 AM2/11/17
to opencog
Hi!

Should I write:
  OwnerPartLink Good Price
Or is some syntactic sugar available especially for those kinds of link?

Alex

unread,
Feb 11, 2017, 6:55:29 PM2/11/17
to opencog
http://wiki.opencog.org/w/Category:Atom_Types does not have AttributeLink or AttributeNode. So - if we want to encode "Apple's price is 1$", we should introduce Price Atom:
a = ConceptNode Apple
p = ConceptNode Price
$1 = NumberNode PriceValue 1$
l1 = MemberLink $1 p
l2 = MemberLink p a

Ben Goertzel

unread,
Feb 11, 2017, 11:22:39 PM2/11/17
to opencog
A more typical idiom would be

EvaluationLink
PredicateNode "Price"
ListLink
ConceptNode "18 oz. jar Skippy peanut butter"
QuantityNode "$7"

or e.g.

ContextLink
AndLink
ConceptNode "Addis Ababa"
TimeNode "2017"
EvaluationLink
PredicateNode "Price"
ListLink
ConceptNode "18 oz. jar Skippy peanut butter"
QuantityNode "$7"


If we want to say that every peanut butter jar has a price, we could say

ForAllLink $X
ImplicationLink
InheritanceLink
$X
ConceptNode "peanut butter jar"
ThereExistsLink $P
EvaluationLink
PredicateNode "Price"
ListLink
ConceptNode $X
QuantityNode $P

and we could also make an abstraction using DefineLink that would let us say

EvaluationLink
DefinedPredicateNode "hasQuantitativeProperty"
ListLink
ConceptNode "peanut butter jar"
PredicateNode "price"

where the

DefinedPredicateNode "hasQuantitativeProperty"
ListLInk
$Con
$Prop

is set up with DefineLink to mean

ForAllLink $X
ImplicationLink
InheritanceLink
$X
ConceptNode $Con
ThereExistsLink $P
EvaluationLink
PredicateNode $Prop
ListLink
ConceptNode $X
QuantityNode $P

So I guess

DefinedPredicateNode "hasQuantitativeProperty"

is the syntactic sugar you're looking for, maybe, but you would have to build it
(apologies the above syntax is not exact...)

ben
> --
> 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+u...@googlegroups.com.
> To post to this group, send email to ope...@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/355d434e-0713-4a9c-802d-f2082c28fc37%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Ben Goertzel, PhD
http://goertzel.org

“I tell my students, when you go to these meetings, see what direction
everyone is headed, so you can go in the opposite direction. Don’t
polish the brass on the bandwagon.” – V. S. Ramachandran

Nil Geisweiller

unread,
Feb 16, 2017, 9:15:44 AM2/16/17
to ope...@googlegroups.com
Guys, just wanted to point out this possibly relevant example

https://github.com/opencog/opencog/tree/master/examples/pln/which-product

Nil
Reply all
Reply to author
Forward
0 new messages