Sentence encoding and decoding method, storage medium, and device

    公开(公告)号:US12093635B2

    公开(公告)日:2024-09-17

    申请号:US17181490

    申请日:2021-02-22

    摘要: Embodiments of this disclosure disclose a sentence processing method and device. The method may include performing word segmentation operation on a source sentence to be encoded to obtain m words. The method may further include obtaining an ith word in the m words using an ith encoding processing node in the n encoding processing nodes, and obtaining an (i−1)th word vector from an (i−1)th encoding processing node. The method may further include performing linear operation and non-linear operation on the ith word and the (i−1)th word vector using the first unit of the ith encoding processing node to obtain an ith operation result, and outputting the ith operation result to the at least one second unit for processing to obtain an ith word vector. The method may further include generating, in response to obtaining m word vectors, a sentence vector according to the m word vectors.