# Random given name

How to take a 3 random given name?

I tried:

• RandomEntity["GivenName", 3]... – C. E. Sep 28 '16 at 12:23

IMO the best way is RandomEntity as C.E. points out in the comments:

RandomEntity["GivenName", 3]


But another (deterministic) way is with the property "SampleEntities":

Take[EntityValue["GivenName", "SampleEntities"], UpTo[3]]


One approach is to use RandomChoice[ ] to get your random names:

list = EntityList["GivenName"];
RandomChoice[list, 3]


• I don't see how this improves on the original situation. Running this now and it looks like it will take an hour to grab the whole list. – george2079 Sep 28 '16 at 21:51
• You only have to download the list once. After that, it should be stored locally. In the program, you can then call RandomChoice many times and sicen it operates on list it is (nearly) instantaneous. – bill s Sep 28 '16 at 22:00