To anyone seeking solution to this in 2025, there is a package NUSS for that - just remember to delete # prior to parsing hashtag: https://cran.r-project.org/web/packages/NUSS/
NUSS::unigram_sequence_segmentation("sometrendingtopic")$segmented
[1] "some trending topic"