There are some questions posted on the same topic regarding this but my concern is something else. I am trying to take dictionary input from command line and able to do it.
python sentence_scorev1.3.py "working today" "0.6" '[{"ques": "hello who are you", "ans": "I am rishabh", "type": 1},{"ques": "your name", "ans": "I am Ram", "type": 2},{"ques": "Are you working today", "ans": "Yes I am", "type": 4'}]'
I have taken the input and converted it into JSON and parse it using
json_data = json.loads(input_data)
where input data is the hash input. My concern is when I pass the same input with ' punctuation in the hash input like see your' in second ques key input
'[{"ques": "hello who are you", "ans": "I am rishabh", "type": 1},{"ques": "your' name", "ans": "I am Ram", "type": 2}
It throws error as the python must have understood it as end of input but still I had input data string. Please let me know how to by-pass this.