Hi,
How do you spot any number of concepts in a sentence?
Sample input:
“the roses in Willy Wonka’s garden were red, blue, green, yellow and purple.”
Desired output:
A definition of 5 variables (say, color1, color2, ... , color 5) OR 5 facts (color1 value red) and so on.
Current approach:
u: SPOT_COLORS (_~colors * _~colors * _~colors * _~colors * _~colors)
if(_0) {
^createfact(color1 value _0)
}
.
.
.
if(_4) {
^createfact(color5 value _4)
}
But this hack clearly isn’t scalable to cases where the number of concepts in the sentence is large (say, 100).
Is there a cleaner approach?
Thanks