Probably the best sentiment analysis is the market before the race, since a horse that looks well or doesn't look well (or is misbehaving) is reflected by the market before the off time, and of course new or strong favourites are the price... as such, it's possible to extract prices from any Betfair market on a fairly high frequency, as was the subject of Automatic Exchange Betting (although this book is now out of date regarding the current Betfair API). Still, you can use any number of libraries to do this - including the R library by Phill Clarke (Betwise blogger), as mentioned here: https://answers.betwise.net/524/abettor-api-ng-package-for-r
Any significant drift in prices from the opening price to the off time, or likewise contraction in price, is often significant.
Of course, you have to programmatically determine what is significant as opposed to "noise" - that's a challenge, since often will depend on the whole market rather than one runner. ie. a significant market move for one horse will cause others to drift, not necessarily indicating that there are negative sentiments against some of the drifters.
But live price analysis is definitely the way to go.
A cruder but perhaps more useful tool would be to look at changes in bookie prices before the off - there are fewer movements in price here, so less noise to worry about.