I'm trying to save a file in yaml format with
with open('data.yml', 'w') as outfile:
yaml.dump(data, outfile, default_flow_style=False)
with data, a dictionary with this format:
data={"## intent:greet": ["hi", "hello" ... "hola"], "## intent:goodbye": [...]}
in order to use it as nlu in a rasa development.
The problem is that yalm.dump does not save the keys in an appropriate way because of the ## character.
it saves the file as
'## intent:greet':
- hi
- hello
instead of
## intent:greet
- hi
- hello
What could be the way to solve the ' ' characters and delete the : in key (## intent:AAA) row??
Thanks
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…