Wolfram Language

Extract Flight Sequences from Text

With the Wolfram Language, it is easy to extract interesting information from complex data stored in an EntityStore. As an example, find flight sequences from a social networking site by aligning the data to the detailed airport data available in the Wolfram Knowledgebase and analyze them with built-in geographic visualization functions.

Start by finding airport codes for all available airports.

Create an Association of airport codes to single airport entities.

Import and register an EntityStore created from an archive of travel.stackexchange.com.

Build and add a property to the EntityStore that extracts listed airport sequences (e.g. "LAX to STL to ORD") from post bodies.

show complete Wolfram Language input

Find and count the airport sequences mentioned in all posts.

Find the top five mentioned airport sequences.

Visualize the 10 most common airport sequences on a map.

Show all airport sequences, colored according to how often they are mentioned.

show complete Wolfram Language input

Find the top three posts by longest flight sequence, using SortedEntityClass and ExtendedEntityClass to avoid redundant code.

Show the posts and their longest flight sequences and distances together.

show complete Wolfram Language input

Show the longest flight sequences on a map, noting the longest flight sequence is a round trip.

show complete Wolfram Language input

Related Examples

ja