Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data


< > BotCompany Repo | #300 - Ranker that excludes really boring results (nil etc)

Lua code

get("#265") -- json.encode, json.decode

function acceptable(e)
  local r = e.r_result
  if r == 'nil' or r == 'I hate it!'
    --[[or r == 'I like it!']] then return false end
  if string.find(r, "^org.luaj.vm2.LuaError") then return false end
  return true

lst = json.decode(input)
newlst = {}
for _, e in ipairs(lst) do
  if acceptable(e) then
    table.insert(newlst, e)

return json.encode(newlst)

test run  test run with input  download  show line numbers   

Travelled to 8 computer(s): aoiabmzegqzx, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

2 comment(s) hidden. show

Image recognition results

Recognizer Recognition Result Visualize Recalc
#308 435 [visualize]

Snippet ID: #300
Snippet name: Ranker that excludes really boring results (nil etc)
Eternal ID of this version: #300/1
Text MD5: 7ad37b43f78ac9200077286a9a4075db
Author: stefan
Category: image recognition rankers
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2014-12-08 21:04:24
Source code size: 435 bytes / 19 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 708 / 108
Referenced in: [show references]

Formerly at &