opentrep-library(3)

πŸ“¦
version 0.08.01 Β· 4 versions
, in epel 10

πŸ’– 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 the ori_por_public.csv file: 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 Β© 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