opentrep-library(3)
π opentrep-library π
okay so bestie, you're looking at the opentrep-library(3) page from the Library Functions Manual β literally the C++ Travel Request Parsing (TREP) Library and it's kind of iconic ngl π¦
β¨ NAME β¨
opentrep-library β the C++ Travel Request Parsing (TREP) Library. yes that's the whole name, slay π
πΈ SYNOPSIS πΈ
#include <opentrep/...>
that's it. that's the vibe. just pull it in π
π« DESCRIPTION π«
OpenTREP is out here providing a clean API β and the matching C++ implementation β for parsing travel-focused requests. like, actual sentences humans type, e.g. "washington dc beijing monday a/r +aa -ua 1 week 2 adults 1 dog". the whole point is making that mess understandable, no cap π₯
For the Information Retrieval part, OpenTREP uses Xapian (http://www.xapian.org), running over freely available travel-related data β country names and codes, city names and codes, airline names and codes, all of it β mainly sourced from the OpenTravelData project (https://github.com/opentraveldata/opentraveldata):
https://github.com/opentraveldata/opentraveldata/tree/master/opentraveldata
OpenTREP exposes a simple, clean, object-oriented API. the way it does this: the static Parse() method takes, as input, a string containing the travel request, and yields, as output, the list of the recognised terms plus their corresponding types. π«Ά
like, for example, the travel request "washington dc beijing monday a/r +aa -ua 1 week 2 adults 1 dog" would give you this whole 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 travellers: 2 adults and a dog
and then that output can be used by other systems β for instance to book the corresponding travel, or to visualise it on a map and calendar and to share it with others. main character energy honestly π
OpenTREP makes an extensive use of existing open-source libraries for increased functionality, speed and accuracy. in particular the Boost library is used (C++ Standard Extensions: http://www.boost.org) β love that for us π
ok important note bestie: OpenTREP currently only recognises points of reference (POR), as to be found in theori_por_public.csvfile:text http://github.com/opentraveldata/optd/blob/trunk/refdata/ORI/ori_por_public.csv
A good complementary tool is GeoBase (http://opentraveldata.github.io/geobases/), a Python-based software able to access to any travel-related data source. πβ¨
π SEE ALSO π
go read those too, iykyk π
π«Ά SUPPORT π«Ά
Please report any bugs to https://github.com/trep/opentrep/issues β they're genuinely nice about it, don't be shy π
π COPYRIGHT π
Copyright Β© 2009-2013 Denis Arnaud
See the COPYING file for more information on the (LGPLv2+) license, or directly on Internet:
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
okay that's the whole page, you ate that π this was OpenTREP, Version 0.08.01, filed under opentrep-library(3) β mwah, go build something cute ππ§β
π¦ where this page comes from
- epel 10: opentrep-devel 0.08.01-2.el10_3 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms