Create a bag of words representation from a given text. **Example:** For the text 'hello world', the output should be {'hello': 1, 'world': 1}. **Constraints:** text length <= 100.
Test Cases
Test Case 1
Input:
'hello world'Expected:
{'hello': 1, 'world': 1}Test Case 2
Input:
'this is a test'Expected:
{'this': 1, 'is': 1, 'a': 1, 'test': 1}+ 3 hidden test cases