MachineLearningForKids | Çocuklar için yapay zeka uygulamasıdır
kandi X-RAY | MachineLearningForKids Summary
kandi X-RAY | MachineLearningForKids Summary
Çocuklar için yapay zeka uygulamasıdır. Yazılım Proje Yönetimi dersi ödevi için geliştirilmiştir.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MachineLearningForKids
MachineLearningForKids Key Features
MachineLearningForKids Examples and Code Snippets
Community Discussions
Trending Discussions on MachineLearningForKids
QUESTION
I have the following Scratch project which has a "kind list" of words like: "good", "kind", "love", "come" etc.
A user should be able to enter any sentence containing any of these words, and the happy face would show.
Currently if the user types "kind" the happy face shows and if it types anything else like "you are kind", the sad face shows.
How do I change this, in scratch, such that if the user types in:
"you are kind" or "how kind you are" or "come here" (any sentence containing any word in the "kindlist") the face is happy,else not.
I can only find a block that allows me to select the LIST and then the ANSWER and no other alternatives. What I want is the Python equivalent of > in list
answer=input("Say something") If any word in the input answer (sentence) in in the list. Then do - - -
For teaching purposes, I am trying to simplify what is on https://machinelearningforkids.co.uk/#!/newproject (creating of the training set). Can this be done directly in scratch or not? Or is this why the site allows you generate blocks on their site first and import them.
Surely Scratch should have the capability to enter data into lists and then test them directly.
I've also tried using a loop (which doesn't quite work correctly either) but was hoping there was a far simpler way.
...ANSWER
Answered 2021-Feb-23 at 18:34I guess Scratch deliberately offers a minimal set of functions,
on the one hand not to overwhelm beginners,
on the other hand to encourage students to piece together simple blocks into more complex systems.
Yes, a simple (sentence) contains (word)
is all you get out-of-the-box;
you do need a loop to match a multi-word sentence against a multi-word whitelist.
Seems to me like you would be better off with some development environment that will at least give you some mature text parsing capabilities. I'm not saying it's impossible to teach student about machine learning using Scratch, but I doubt it's the best tool for the job. It feels like somebody wants to give music lessons, but students first have to go through the process of building a piano.
As for your code, it looks like a good start. Some suggestions:
- Replace the 'forever' loop with a loop bounded by the length of list 'kindthings'.
- Include a leading and a trailing space in the 'contains' check, to make sure only whole words match. Wouldn't want 'unhappy' in a sentence to match 'happy' in the whitelist.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MachineLearningForKids
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page