主权项 |
1. A method for processing a travel-related search request comprising:
receiving, at one or more processors, a free-text input that relates to the travel-related search request, the free-text input comprising a sequence of data strings; matching, by the one or more processors, a first portion of the data strings to a first item from a set of pre-determined items and a second portion of the data strings to a second item from the pre-determined items, wherein each of the pre-determined items are associated with a search data field type; defining, by the one or more processors, a plurality of search parameters based on the search data field type of the first item and the search data field type of the second item; and building, by the one or more processors, a query for the travel-related search request based on the search parameters, wherein matching the first portion of the data strings to the first item from the pre-determined items comprises identifying a longest portion of the sequence of data strings that matches a first one of the pre-determined items and defining the first one of the pre-determined items as the first item, and wherein matching the second portion of the data strings to the second item from the pre-determined items comprises:
after matching the first portion of the data strings to the first item, defining a first remaining portion as the difference between the sequence of data strings and the longest portion of the sequence of data strings that matches the first one of the pre-determined items;identifying a longest portion of the first remaining portion that matches a second one of the pre-determined items; anddefining the second one of the pre-determined items as the second item. |