Spaces:
Sleeping
Sleeping
| import json | |
| from collections import Counter | |
| path = r'c:\Users\Acer\Downloads\Wanderlust\chatbot-ml-service\app\data\datasets\intent_train.json' | |
| with open(path, encoding='utf-8') as f: | |
| data = json.load(f) | |
| new_samples = [ | |
| {'text': 'bật bản đồ cho tôi xem', 'intent': 'show_map'}, | |
| {'text': 'cho tôi xem bản đồ', 'intent': 'show_map'}, | |
| {'text': 'xem bản đồ địa điểm', 'intent': 'show_map'}, | |
| {'text': 'hiển thị bản đồ', 'intent': 'show_map'}, | |
| {'text': 'mở bản đồ lên', 'intent': 'show_map'}, | |
| {'text': 'bản đồ ở đâu', 'intent': 'show_map'}, | |
| {'text': 'tôi muốn xem bản đồ', 'intent': 'show_map'}, | |
| {'text': 'cho xem vị trí trên bản đồ', 'intent': 'show_map'}, | |
| {'text': 'xem vị trí các địa điểm', 'intent': 'show_map'}, | |
| {'text': 'chỉ tôi vị trí trên bản đồ', 'intent': 'show_map'}, | |
| {'text': 'dựa vào kế hoạch đã lưu thì bật chức năng map cho tôi xem', 'intent': 'show_map'}, | |
| {'text': 'từ kế hoạch đã lưu cho tôi xem bản đồ', 'intent': 'show_map'}, | |
| {'text': 'kế hoạch đã lưu hiện bản đồ', 'intent': 'show_map'}, | |
| {'text': 'hiện bản đồ từ kế hoạch', 'intent': 'show_map'}, | |
| {'text': 'bật map từ kế hoạch trên', 'intent': 'show_map'}, | |
| {'text': 'xem bản đồ kế hoạch đã lưu', 'intent': 'show_map'}, | |
| {'text': 'từ kế hoạch trên show bản đồ', 'intent': 'show_map'}, | |
| {'text': 'bật map cho kế hoạch Đà Nẵng', 'intent': 'show_map'}, | |
| {'text': 'xem bản đồ địa điểm trong kế hoạch', 'intent': 'show_map'}, | |
| {'text': 'hiển thị map từ kế hoạch đã lưu', 'intent': 'show_map'}, | |
| {'text': 'cho tôi xem bản đồ các điểm trong kế hoạch', 'intent': 'show_map'}, | |
| {'text': 'bản đồ vị trí cụ thể của các địa điểm đã đề xuất', 'intent': 'show_map'}, | |
| {'text': 'cho tôi xem vị trí cụ thể của các địa điểm đã đề xuất ở trên bản đồ', 'intent': 'show_map'}, | |
| {'text': 'vị trí các địa điểm du lịch trên bản đồ', 'intent': 'show_map'}, | |
| {'text': 'show map các điểm du lịch', 'intent': 'show_map'}, | |
| {'text': 'xem map Đà Nẵng', 'intent': 'show_map'}, | |
| {'text': 'bản đồ Hội An', 'intent': 'show_map'}, | |
| {'text': 'bản đồ Hà Nội', 'intent': 'show_map'}, | |
| {'text': 'xem bản đồ Nha Trang', 'intent': 'show_map'}, | |
| {'text': 'bản đồ vị trí Sapa', 'intent': 'show_map'}, | |
| {'text': 'cho tôi xem map Phú Quốc', 'intent': 'show_map'}, | |
| {'text': 'hiển thị bản đồ địa điểm du lịch Huế', 'intent': 'show_map'}, | |
| {'text': 'mở bản đồ Hồ Chí Minh', 'intent': 'show_map'}, | |
| {'text': 'bản đồ các địa điểm nổi tiếng ở Đà Lạt', 'intent': 'show_map'}, | |
| {'text': 'chỉ đường đến các điểm tham quan', 'intent': 'show_map'}, | |
| {'text': 'xem địa điểm trên bản đồ đi', 'intent': 'show_map'}, | |
| {'text': 'có bản đồ không', 'intent': 'show_map'}, | |
| {'text': 'bật google maps', 'intent': 'show_map'}, | |
| {'text': 'mở openstreetmap', 'intent': 'show_map'}, | |
| {'text': 'bản đồ đường đi', 'intent': 'show_map'}, | |
| {'text': 'xem vị trí địa điểm này trên bản đồ', 'intent': 'show_map'}, | |
| {'text': 'map ở đâu', 'intent': 'show_map'}, | |
| {'text': 'tôi cần xem bản đồ', 'intent': 'show_map'}, | |
| {'text': 'hiển thị vị trí trên map', 'intent': 'show_map'}, | |
| {'text': 'xem trên map đi', 'intent': 'show_map'}, | |
| {'text': 'bản đồ Cần Thơ', 'intent': 'show_map'}, | |
| {'text': 'xem bản đồ Mũi Né', 'intent': 'show_map'}, | |
| {'text': 'bản đồ vị trí các khách sạn', 'intent': 'show_map'}, | |
| {'text': 'xem bản đồ các nhà hàng gần đó', 'intent': 'show_map'}, | |
| {'text': 'cho tôi xem vị trí trên google maps', 'intent': 'show_map'}, | |
| {'text': 'show me the map', 'intent': 'show_map'}, | |
| {'text': 'open the map', 'intent': 'show_map'}, | |
| {'text': 'show map', 'intent': 'show_map'}, | |
| {'text': 'display the map', 'intent': 'show_map'}, | |
| {'text': 'show location on map', 'intent': 'show_map'}, | |
| {'text': 'where is it on the map', 'intent': 'show_map'}, | |
| {'text': 'I want to see the map', 'intent': 'show_map'}, | |
| {'text': 'show me the locations on the map', 'intent': 'show_map'}, | |
| {'text': 'show map from saved plan', 'intent': 'show_map'}, | |
| {'text': 'based on saved plan show me the map', 'intent': 'show_map'}, | |
| {'text': 'show me the map of Da Nang', 'intent': 'show_map'}, | |
| {'text': 'map of Hanoi', 'intent': 'show_map'}, | |
| {'text': 'show map of Hoi An', 'intent': 'show_map'}, | |
| {'text': 'display map for Nha Trang', 'intent': 'show_map'}, | |
| {'text': 'open google maps for Phu Quoc', 'intent': 'show_map'}, | |
| {'text': 'show me on the map', 'intent': 'show_map'}, | |
| {'text': 'can you show the map', 'intent': 'show_map'}, | |
| {'text': 'view map', 'intent': 'show_map'}, | |
| {'text': 'show locations from the saved plan on map', 'intent': 'show_map'}, | |
| {'text': 'map of the destinations in my plan', 'intent': 'show_map'}, | |
| {'text': 'show map of trip plan', 'intent': 'show_map'}, | |
| {'text': 'display saved plan on map', 'intent': 'show_map'}, | |
| {'text': 'show me the places on a map', 'intent': 'show_map'}, | |
| {'text': 'can I see the map view', 'intent': 'show_map'}, | |
| {'text': 'view location on map', 'intent': 'show_map'}, | |
| {'text': 'bring up the map', 'intent': 'show_map'}, | |
| {'text': 'show route on map', 'intent': 'show_map'}, | |
| {'text': 'display on map', 'intent': 'show_map'}, | |
| {'text': 'see map', 'intent': 'show_map'}, | |
| {'text': 'show the places on google maps', 'intent': 'show_map'}, | |
| ] | |
| data.extend(new_samples) | |
| with open(path, 'w', encoding='utf-8') as f: | |
| json.dump(data, f, ensure_ascii=False, indent=2) | |
| intents = [d['intent'] for d in data] | |
| print(f'Total samples: {len(data)}') | |
| print(Counter(intents).most_common()) | |