In this paper, the optimization of semantic communications over energy harvesting networks is studied. In the considered model, a set of users use semantic communication techniques and the harvested energy to transmit text data to a base station (BS). Here, semantic communication techniques enable each user to transmit the meaning of the original data (called semantic information) thereby reducing its transmission delay and energy consumption. The BS will recover the data using the received semantic information. To further improve communication efficiency, each user can transmit only partial semantic information to the BS. Therefore, each user needs to jointly determine the partial semantic information to be transmitted and the resource block (RB) that is used for semantic information transmission. This problem is formulated as an optimization problem whose goal is to maximize the sum of all users' similarities that capture the differences between the original data that each user needs to transmit and the data recovered by the BS. To solve this problem, a value decomposition based deep Q network is proposed, which enables the users to jointly find the semantic information transmission and the RB allocation schemes that maximize the sum of all users' similarities. Simulation results demonstrate that the proposed method can improve sum of all users' similarities by up to threefold compared to the independent reinforcement learning.