Hey there, I don't know if you've solved your issue, but this was a major problem for me that took some time to work out. For anyone else who runs into this problem, maybe consider this solution.
What I did was manually write JSON format arrays and dictionaries to put labels for each token (singular word that makes up a sentence - image you take your input sentence and say textString.split(by: " ") (by space))
What really sped things up was bringing chat gpt in. It took awhile to teach it what I needed to do, but you can get it to spit out correct format json after giving it around 15-20 items you've written manually.
Here's the format:
[
{
"tokens": ["Remind", "me", "tomorrow", "at", "8", "am", "to", "leave", "for", "work"],
"labels": ["NONE", "NONE", "TIME", "TIME", "TIME", "TIME", "NONE", "REMINDER", "REMINDER", "REMINDER"]
},
{
"tokens": ["Set", "a", "reminder", "next", "tuesday", "to", "buy", "a", "large", "ruler"],
"labels": ["NONE", "NONE", "NONE", "TIME", "TIME", "NONE", "REMINDER", "REMINDER", "REMINDER", "REMINDER"]
}
]
Each word in the "tokens" array lines up with a label in the "labels" array. The ml model, whence you successfully train it, will take in a sentence and spit out an array of labels that you can do a lot of things with.. that's another discussion.
Hope this helps,
roroDevelopment