How to filter content from the Google Natural Language Pack AnalyzeEntities()?


I’m trying to filter the output of the AnalyzeEntities() formula but I’m not able to do so, this is what I’m trying to do:

  • Column A: Some text
  • Column B: The AnalyzeEntities() formula, the output gives me the entities with 3 parameters each NAME, TYPE, SALIENCE
  • Column C: I want to extract the results of column B but only the ones where TYPE = “Person”, but I’m not able to get the right formula.

Does anyone know how to do so?


1 Like

Hi @Lsdbc
and welcome to Coda Community! :handshake:

When Pack’s formula returns an object, you can deal with it just as it was a table: being the object a row and its attributes the columns.

In your case, your Column C could be:

Column B.Filter(currentValue.Type="PERSON")

Or, to be really sure about case:

Column B.Filter(currentValue.Type.Lower()="person")

I hope this helps.



That did the trick!


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.