Post

Replies

Boosts

Views

Activity

Reply to Word tagging tools for CreateML?
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
Topic: Machine Learning & AI SubTopic: General Tags:
Apr ’23
Reply to Word tagging tools for CreateML?
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
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Duplicate Keys of Type 'EKEvent' were found in a Dictionary
Ok sorry for the late reply, Ill send you the code soon because I’m not near my computer right now.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’21