OpenRefine is designed to work down a column, so to do this in a single step you may want to look at writing an expression that builds a single list of true/false (or 1/0) values which you can then split into columns afterwards. So from the original cell (or a duplicate of the original cell if you need to preserve the original) you could do something like:
output_list = []
data = [{
"canonical name":"spanner",
"alternative names":"spanner"
},
{
"canonical name":"wrench",
"alternative names":"wrench"
},
{
"canonical name":"hammer",
"alternative names":"hammer,big hammer,nail hitting tool"
},
{
"canonical name":"screwdriver",
"alternative names":"screwdriver, screw driver"
},
]
for datum in data:
names = [name.strip() for name in datum["alternative names"].split(',')]
names.append(datum["canonical name"])
# in case the value is null it will return 0
if value:
output_list.append(str(any(name.lower() in value.lower() for name in names)))
else:
output_list.append(str(0))
return ','.join(output_list)
This would give you a comma separate list of values that you could then split into columns using the OpenRefine menu option Edit Column -> Split into several columns, with a comma as the separator
To be honest at this point I do wonder if OpenRefine is the appropriate tool, especially if you want to automate it. If you are able to write the Python, it wouldn't be much of a step from what you have to writing the whole thing in a Python script
There maybe other factors in play of course, but I wouldn't stick to OpenRefine for this type of task unless it was giving me some other benefit
Best wishes
Owen