Click4Ai

248.

Hard

Slot Filling is a task in NLP that involves extracting specific information from a user's message. **Example:** Given a message 'I want to book a flight from New York to Los Angeles', the slots are 'from': 'New York' and 'to': 'Los Angeles'. **Constraints:** The input will be a string and the output will be a dictionary of extracted slots.

Test Cases

Test Case 1
Input: 'I want to book a flight from New York to Los Angeles'
Expected: {'from': 'New', 'to': 'Los'}
Test Case 2
Input: 'I need to travel from Chicago to Miami'
Expected: {'from': 'Chicago', 'to': 'Miami'}
+ 3 hidden test cases