A train is a vehicle that is used to transport people or goods. Freight is the goods that are transported by a train. A ship is a vehicle that is used to transport people or goods across water. Cargo is the goods that are transported by a ship.
So, we can say that "train is to freight as ship is to cargo".