Description: | opentrep aims at providing a clean API, and the corresponding C++
implementation, for parsing travel-focused requests.
It powers the https://transport-search.org Web site.
opentrep uses Xapian (https://www.xapian.org) for the Information Retrieval part,
on freely available travel-related data (e.g., country names and codes,
city names and codes, airline names and codes, etc.), mainly to be found in
the OpenTravelData project (https://github.com/opentraveldata/opentraveldata):
https://github.com/opentraveldata/opentraveldata/tree/master/opentraveldata
The data files are available from https://transport-search.org/data/optd/por/
opentrep exposes a simple, clean and object-oriented, API. For instance,
the OPENTREP::interpretTravelRequest() method takes, as input, a string
containing the travel request, and yields, as output, the list of the
recognized terms as well as their corresponding types.
As an example, the travel request
'Washington DC Beijing Monday a/r +AA -UA 1 week 2 adults 1 dog' would give
the following list:
* Origin airport: Washington, DC, USA
* Destination airport: Beijing, China
* Date of travel: next Monday
* Date of return: 1 week after next Monday
* Preferred airline: American Airlines; non-preferred airline: United Airlines
* Number of travelers: 2 adults and a dog
The output can then be used by other systems, for instance to book the
corresponding travel or to visualize it on a map and calendar and to
share it with others.
opentrep makes an extensive use of existing open-source libraries for
increased functionality, speed and accuracy. In particular the
Boost (C++ Standard Extensions: http://www.boost.org) and
SOCI (http://soci.sourceforge.net) libraries are used.
Note that opentrep currently only recognizes points of reference (POR),
as to be found in the following file: http://bit.ly/1DXIjWE
A good complementary tool is GeoBase (http://opentraveldata.github.io/geobases),
a Python-based software able to access to any travel-related data source. |