AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Possible to iterate through a Concept?
 
 

I know that I can find the number of members in a concept with the “countmember” function, but I’m not seeing a way to iterate through the Concept and pull out each member.  Is this something that can be done?


Thank you

 

 
  [ # 1 ]

yes, with caveats

Concepts are just facts of the form:

(xxx member conceptname)

So you can query for all facts that are members of conceptname, and then use the fact set iterators to pull out the members.
eq query(direct_vo ? member ~animals)


Caveats include: 

1. Fact sets are limited to about 10,000 facts, and so will discard extra members beyond that.
2. concepts can be nested, so you would have to detect that and walk the subnest as a separate query.

 

 
  [ # 2 ]

Thank you, works like a champ!

 

 
  login or register to react