Message Boards Message Boards

0
|
1315 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How to use functions like FilteredEntityClass with a list

I am wondering if there is a way to create a custom EntityClass from an EntityList. For example, I can find a lit of all American Civil War battles, and I want to create an entity class with this to use FilteredEntityClass on. Is there a way to do this, or does it only work for the entity classes in the entity framework?

POSTED BY: Peter Burbery

I figured out how to do it:

CivilWarBattles = 
 Entity["MilitaryConflict", "AmericanCivilWar"][
  "AllSubconflicts"]; ClassForCivilWarBattles = 
 FilteredEntityClass["MilitaryConflict", 
  EntityFunction[b, MemberQ[CivilWarBattles, b]]];
ContainsExactly[CivilWarBattles][EntityList@ClassForCivilWarBattles]
POSTED BY: Peter Burbery
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract