Editor

Save Delete

See lua manual

Available variables

-- entity_id = 3
integer entity_id

-- entity_type = person
string entity_type

-- acc = "Unknown" - only available in dri
string acc
			

Supported methods

-- debug(anything) prints anything to debug console when testing
null debug(anything)

-- hasTaxonomy(1, "SISORU0188", { "DType_12", "DType_15" })
boolean hasTaxonomy(entity, question, taxonomy)

-- getAnswer(1, "SISORU0188")
string getAnswer(entity, question)

-- getAnswer(1, "SISORU0188", true)
array(row => answer) getAnswer(entity, question, multiple)

-- getAnswer(1, "SISORU0188", true, 0)
string getAnswer(entity, question, multiple, row)

-- containsLike("sentence with wurd", "word") returns true if metaphone of words is the same
boolean containsLike(haystack, needle)

-- inList("needle", {"haystack","haystack"})
boolean inList(name, list)

-- listIntersect({"needle1", "needle2"}, {"haystack1", "haystack2"})
boolean listIntersect(list1, list2)

-- hasFact("name") - only available in acc and dri
boolean hasFact(name)

-- wasDark("51.454513, -2.58791","2017-12-01 12:00", "2017-12-01 19:00") identifies if location during UTC period was dark
boolean wasDark(location, from_date_time, to_date_time)

-- wasDark("51.454513, -2.58791", "2017-12-01 12:00") identifies if location at UTC date time was dark
boolean wasDark(location, date_time)