Federal transportation authorities announced Monday that Caltrain will get the $647 million it needs to electrify the commuter line, which runs from San Francisco to Gilroy. U.S. Transportation Secretary Elaine Chao will sign a deal disbursing the money over the next five years. The federal dollars will cover about a third of the $2 billion project. The state and local government agencies will have to drum up the rest of the money.