Rapid on-demand manufacturing resource sharing within and between factories are critical to achieving responsive autonomous manufacturing collaborations towards mass personalization. To this end, cloud manufacturing technologies allow resource owners/service providers to virtualize and encapsulate their resources as services accessible over the Internet. Decision-making in cloud manufacturing needs to utilize real-world engineering knowledge from different parties. Many existing systems have adopted the semantic web-based decision-making framework, in which engineering knowledge is modeled using structured syntax. However, manually converting engineering rules to semantic rules is time-consuming and error prone. This research proposes a machine learning model, based on the Transformer model, that uses neural machine translation techniques to convert engineering knowledge expressed in natural language to structured semantic rules directly. The model is implemented using neural network. The model is first trained using typical sentences that are used for describing engineering knowledge. From these sample sentences, the model learns the patterns and the meaning of the sentences. This allows the model to identify the service providers, resource users, and the resources described in the sentences. As a result, the corresponding semantic rules can be constructed. Compared with previous approaches, the proposed scheme not only improves the conversion accuracy but also reduces the amount of required human interaction, simplifying the system and its use.