(reposted from general discussions forum)
What's the best way to provide loose matching based on color words from free text descriptions?
The idea is to be able to score two different animal descriptions where the description is free text.
As an example, if one person describes a dog as chocolate and cream and the other describes a dog as wheat and brown.
Can Power AI be trained to recognise a heap of different color adjectives as brown, and a different heap as yellow, so that both of the above descriptions are identified as brown and yellow?
Would I be better off doing this parsing the descriptions with regex functions?
Solved! Go to Solution.
Thanks for the responses.
Being a n00b with Dynamics, I've opted for the regex solution.
I can classify a custom entity to hold the regex expression and the corresponding colour, and loop through these with power automate. If I get no colour results at all, I can refer that instance for human review, which can result in the custom entity regex expression being extended.
e.g.
BROWN | (?:auburn|brown|brunette|chestnut|chocolate|cocoa|coppery|liver|mahogany|russet|tan|tawny) |
BLACK | (?:black|charcoal|night|pepper|raven|sable|soot) |
WHITE | (?:ivory|milk|salt|snow|white) |
GREY | (?:blue|concrete|grey|pewter|silver|steel) |
YELLOW | (?:blonde|butter|cream|gold|honey|wheat|yellow) |
ORANGE | (?:carrot|coral|flame|orange|salmon) |
RED | (?:blood|cherry|claret|mahogany|red|russet|wine) |
GREEN | (?:avocado|green|khaki|spinach|pea|verdigris) |
BLUE | (?:aqua|blue|bluish|navy|silver) |
PURPLE | (?:berry|lavender|magenta|mauve|plum|purple|velvet|violet) |
Hi Steve, You might be able to train a custom text classification model to classify broad descriptions in specific color buckets. It definitely won't be easy or practical but it's the best I can think of right now 🙂 You can find documentation at: https://docs.microsoft.com/en-us/ai-builder/text-classification-overview. It might be easier to just go with your other idea of creating a dictionary of colors and looking up the words to be honest.
Thanks for the responses.
Being a n00b with Dynamics, I've opted for the regex solution.
I can classify a custom entity to hold the regex expression and the corresponding colour, and loop through these with power automate. If I get no colour results at all, I can refer that instance for human review, which can result in the custom entity regex expression being extended.
e.g.
BROWN | (?:auburn|brown|brunette|chestnut|chocolate|cocoa|coppery|liver|mahogany|russet|tan|tawny) |
BLACK | (?:black|charcoal|night|pepper|raven|sable|soot) |
WHITE | (?:ivory|milk|salt|snow|white) |
GREY | (?:blue|concrete|grey|pewter|silver|steel) |
YELLOW | (?:blonde|butter|cream|gold|honey|wheat|yellow) |
ORANGE | (?:carrot|coral|flame|orange|salmon) |
RED | (?:blood|cherry|claret|mahogany|red|russet|wine) |
GREEN | (?:avocado|green|khaki|spinach|pea|verdigris) |
BLUE | (?:aqua|blue|bluish|navy|silver) |
PURPLE | (?:berry|lavender|magenta|mauve|plum|purple|velvet|violet) |