cnlps-caiccaic/postproces.py

18 lines
376 B
Python
Raw Permalink Normal View History

2023-06-11 07:45:01 +02:00
import sys
import regex as re
a = ["Weather WeatherInLocation 'location': 'too cold'", "Airconditioner GetHumidity"]
for line in sys.stdin:
# for line in a:
line = line.rstrip()
line_s = line.split(' ', 2)
if len(line_s) ==2:
print("\t".join(line_s) + '\t' + "{}")
else:
print("\t".join(line_s[:2]) + "\t" + "{" + line_s[2] +'}')