2
$\begingroup$

I have some issues with the Lookup in Association. My association looks as:

asso = <|{"The", "food"} -> 1, {"food", "at"} -> 1, {"at", "snack"} ->
1, {"snack", "is"} -> 1, {"is", "a"} -> 1, {"a", "selection"} -> 
1, {"selection", "of"} -> 1, {"of", "popular"} -> 1, {"popular", "Greek"} -> 
1, {"Greek", "dishes"} -> 1, {"dishes", "The"} -> 1, {"The", "appetizer"} -> 
1, {"appetizer", "tray"} -> 1, {"tray", "is"} -> 1|>

I want to find the value of specific key in the asso

resKeys = Keys[asso]
resKeys[[1]]
Lookup[bigramUniqe, resKeys[[1]]]

But I get the next result:

{Missing["KeyAbsent", "The"], Missing["KeyAbsent", "food"]}
$\endgroup$

closed as off-topic by MarcoB, m_goldberg, José Antonio Díaz Navas, rcollyer, swish May 1 '18 at 23:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, m_goldberg, José Antonio Díaz Navas, rcollyer, swish
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ That's a specialty when using Lists or Integers as keys in an Association. In order to make it unambigous, one has to wrap with Key: like this: Lookup[asso, Key[resKeys[[1]]]]. $\endgroup$ – Henrik Schumacher Apr 29 '18 at 19:23
  • $\begingroup$ thanks a lot for your help to me today $\endgroup$ – Kiril Danilchenko Apr 29 '18 at 19:27
  • 1
    $\begingroup$ You're welcome. (Will be here also tomorrow ;) ) $\endgroup$ – Henrik Schumacher Apr 29 '18 at 19:28

Browse other questions tagged or ask your own question.