In this paper, a semantic communication framework is proposed for wireless networks. In the proposed framework, a base station (BS) extracts the semantic information from textual data, and, transmits it to each user. This semantic information is modeled by a knowledge graph (KG) and hence, the semantic information consists of a set of semantic triples. After receiving the semantic information, each user recovers the original text using a graph-to-text generation model. To measure the performance of the studied semantic communication system, a metric of semantic similarity (MSS) that jointly captures the semantic accuracy and completeness of the recovered text is proposed. Due to wireless resource limitations, the BS can only transmit partial semantic information to each user so as to satisfy the transmission delay constraint. Hence, the BS must select an appropriate resource block for each user and determine partial semantic information to be transmitted. This problem is formulated as an optimization problem whose goal is to maximize the total MSS by optimizing the resource allocation policy and determining the partial semantic information to be transmitted. To solve this problem, a policy gradient-based reinforcement learning (RL) algorithm integrated with the attention network is proposed. The proposed algorithm can evaluate the importance of each triple in the semantic information using an attention network and then, build a relationship between the importance distribution of the triples in the semantic information and the total MSS. Simulation results demonstrate that the proposed semantic communication framework can reduce the size of data that the BS needs to transmit by up to 46% and yield a two-fold improvement in the total MSS compared to a standard communication network that does not consider semantic communications.